Base64 encoder and decoder
Encode Unicode text or decode UTF-8 Base64.
Your result will appear here.
Enter your input, then run the tool.How to use the base64 encoder and decoder
Base64 turns text bytes into characters that are easy to copy into text-only places. This tool encodes Unicode text as UTF-8 and decodes it back.
Paste text or Base64, choose encode or decode, then copy the result.
- Paste text to encode, or Base64 to decode, into Input.
- Set Mode to encode or decode.
- Press Run tool, then copy or download the result.
Good to know
- Encoding uses UTF-8 bytes, so accented letters and emoji are supported.
- Decoding rejects invalid Base64 or bytes that are not valid UTF-8.
- Base64 is an encoding, not encryption.
- Input is limited to 500,000 characters and processed in your browser.
Examples
- Encode Hello → SGVsbG8=.
- Encode café → Y2Fmw6k=, and 😀 → 8J+YgA==.
- Decode SGVsbG8 (no padding), or SGVs and bG8= on two lines → Hello. Whitespace is removed and missing = padding is added.
If something goes wrong
Invalid Base64 character ":" at position 5.
You pasted a data: URL. Delete everything up to and including the comma after base64. Positions are counted after spaces and line breaks are removed.
Base64 length is invalid; the text may be truncated.
One or more characters are missing from the end. Copy the full value again.
Base64 padding (=) may only appear at the end.
Text follows an = sign, often because two values were pasted together. Decode them one at a time.
Decoded data is not valid UTF-8 text.
The Base64 holds binary data, such as an image or a compressed file, or text in another encoding. This tool only outputs UTF-8 text.
Questions
Can I decode any Base64 file?
No. This tool expects Base64 that represents UTF-8 text.
Does Base64 keep text secret?
No. Anyone can decode it.
Why is encoded text longer?
Base64 represents bytes with a limited alphabet, which adds length.
Does it accept URL-safe Base64?
Yes. When the input uses - and _ and no + or /, they’re read as + and /, so 8J-YgA decodes to 😀. Encoding always produces standard Base64.
Background reading: Base64, URL encoding and HTML entities: which one do you need?
Next steps: URL encoder and decoder · Hash generator
