Base64
Encode
Encode and decode Base64 text, including Chinese and URL-safe output.
Enter text to see Base64.
How to use
Switch Encode and Decode at the top. On Encode, paste text to get Base64. On Decode, paste Base64 to get the original text. The two tabs keep separate input. Turn on URL-safe for use in URLs. Chinese is handled as UTF-8.
FAQ
Why is Chinese garbled after decoding?
- This page encodes and decodes as UTF-8. If the original was another encoding, the result will not match.
What is URL-safe Base64?
- Standard Base64 uses + and /, which are awkward in URLs. URL-safe uses - and _ and drops trailing =.
Why does decoding fail?
- Usually missing characters, illegal symbols, or truncated Base64. Whitespace is ignored.
Can I encode a file?
- This tool only handles text. Use an image or file tool for binary Base64.