Base64 Encoder / Decoder
Encode or decode Base64 for text and files — UTF-8 safe, URL-safe option, fully in-browser.
100% in your browser. Nothing is uploaded.
Output appears here.
Encode a file
Frequently asked questions
Is my data uploaded anywhere?
No. All encoding and decoding runs entirely in your browser using built-in JavaScript APIs. Nothing leaves your device.
What is URL-safe Base64?
Standard Base64 uses + and / characters that have special meaning in URLs. URL-safe Base64 replaces + with - and / with _, and strips = padding — making the output safe to include in query strings and path segments without further escaping.
Why does naive btoa() break on non-ASCII text?
btoa() only handles Latin-1 (byte values 0–255). Multi-byte UTF-8 characters like emoji or CJK glyphs have code points above 255, which throws. This tool first encodes text to a UTF-8 byte array, then Base64-encodes those bytes — so any Unicode string works correctly.
More dev tools
JSON Formatter
Format, validate, minify, and explore JSON.
JWT Decoder
Decode and verify JSON Web Tokens.
URL Encoder
Encode, decode, and parse URLs and query strings.
Hash Generator
MD5, SHA-1, SHA-256/384/512 for text and files.
UUID Generator
UUID v4, v7, and Nano ID. Bulk generation.
Regex Tester
Test patterns with live matches and replace.