Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to plain text instantly in your browser. Free, no login, 100% client-side. Supports Unicode.
What is Base64 and when do you use it?
Base64 is an encoding scheme that represents binary data using only 64 printable ASCII characters. The name comes from the 64-character alphabet it uses: A–Z, a–z, 0–9, +, and /. It was designed for one purpose: safely transmitting data through channels that only support plain text.
Common real-world uses include embedding images directly in HTML or CSS (data:image/png;base64,…), encoding binary payloads in JSON APIs, storing small files in localStorage, and transmitting data in email (MIME encoding).
How to encode and decode
- To encode: paste your plain text into the input and click Encode →. The Base64 string appears in the output.
- To decode: paste the Base64 string into the input and click ← Decode. The original text appears in the output.
- Use Swap ⇅ to move the output back to the input for chaining operations.
Base64 vs URL-safe Base64
Standard Base64 uses + and /, which have special meaning in URLs. URL-safe Base64 replaces them with - and _and omits padding. You'll encounter URL-safe Base64 in JWTs, OAuth tokens, and some API parameters. If you see - and _ instead of + and /, replace them before decoding with this tool.
Frequently asked questions
- What is Base64 encoding?
- Base64 converts binary data (or any text) into a string of 64 safe ASCII characters (A–Z, a–z, 0–9, +, /). It's used to safely transmit data in contexts that only support text — like embedding images in HTML, sending binary data in JSON, or storing data in cookies.
- Is Base64 the same as encryption?
- No. Base64 is encoding, not encryption. It's fully reversible by anyone who sees it — there's no key, no secret, no security. Never use Base64 to protect sensitive data. Use it only to encode data so it survives text-only transport.
- Does this tool support Unicode and emoji?
- Yes. The encoder uses encodeURIComponent + unescape internally to handle the full Unicode range before passing to btoa(), so characters like ₹, 中文, and emoji all encode and decode correctly.
- Is my data sent to a server?
- No. Encoding and decoding happen in your browser using JavaScript's built-in btoa() and atob() functions. Nothing is uploaded or logged.
- What's the = sign at the end of Base64?
- Base64 encodes 3 bytes at a time into 4 characters. If the input isn't a multiple of 3 bytes, padding characters (=) are added to make the output length a multiple of 4. One = means 1 padding byte; == means 2.
Related tools
- JSON Formatter
Format, beautify, minify, and validate JSON in your browser
- QR Code Generator
Generate QR codes for URLs, text, Wi-Fi, and more. Download as PNG.
- Password Generator
Generate strong, random passwords with custom length and character sets.
- URL Encoder / Decoder
Encode or decode URLs and query strings with percent-encoding.
- Hash Generator
Generate SHA-1, SHA-256, SHA-384, and SHA-512 hashes instantly.