Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 back into readable text, with full support for Unicode characters (accents, emoji, symbols). Everything happens in your browser — nothing is sent to any server.
How it works
- Choose the 'Encode' or 'Decode' tab depending on what you need.
- Paste or type the text (or the Base64 string) into the input panel.
- The result appears instantly in the output panel, using TextEncoder/TextDecoder to handle Unicode correctly.
- If the Base64 you entered isn't valid, you'll see a clear error message.
- Copy the result or download it as a text file.
Use cases
- Encode credentials or tokens to include in HTTP headers (for example, Basic Auth).
- Decode Base64 payloads received from APIs, webhooks, or emails.
- Embed small images or binary files as Data URLs in HTML or CSS.
- Debug Base64-encoded data found in logs or configuration files.
Use cases
- Encode credentials or tokens to include in HTTP headers (for example, Basic Auth).
- Decode Base64 payloads received from APIs, webhooks, or emails.
- Embed small images or binary files as Data URLs in HTML or CSS.
- Debug Base64-encoded data found in logs or configuration files.
Common mistakes
- Using btoa()/atob() directly in JavaScript with text that has accents or emoji.btoa() only supports Latin-1 characters and fails or corrupts the result with Unicode. This tool uses TextEncoder/TextDecoder to avoid that problem.
- Confusing Base64 with encryption.Base64 is just a reversible encoding — it doesn't hide or protect information. Don't use it for sensitive data.
- Pasting Base64 copied from a file with line breaks (like a .pem).Remove the extra line breaks before decoding, or the tool will flag the Base64 as invalid.
Frequently asked questions
No. All encoding and decoding happen locally in your browser using JavaScript. Your text never leaves your device.
Yes. Unlike calling btoa() directly on text (which fails on characters outside Latin-1), this tool uses TextEncoder and TextDecoder to work with the text's actual UTF-8 encoding, so accents, emoji, and other Unicode characters encode and decode without errors.
The tool detects the problem and shows an error message telling you the Base64 is invalid, instead of displaying a broken or incorrect result.
Base64 is an encoding scheme that represents binary data using only printable ASCII characters. It's commonly used to transmit binary data in contexts that only accept text, such as URLs, JSON, emails, or HTTP headers.
Alternatives
In the terminal, commands like base64 (Linux/macOS) or certutil -encode (Windows) do the same thing, and nearly every programming language ships a Base64 function in its standard library. This tool is handy when you need a quick result without opening a terminal or writing code.