Base64 Encoder and Decoder — Free Online Tool
Convert text or files to Base64 and back, with full Unicode and URL-safe support.
🔒 Runs in your browser — files never uploaded ⚡ No signup 💯 Free
Encode a file to Base64
Encode text or any file to Base64, or decode a Base64 string back to readable text. Handles Unicode correctly — emoji and accented characters survive the round trip, which many simple encoders get wrong.
How to use Base64 Encode / Decode
- Pick a direction — encode or decode.
- Paste your content. Conversion happens as you type.
- Toggle URL-safe if the result goes in a URL or filename.
- Or drop a file in the lower panel to get a Base64 string or a complete
data:URI.
Why Unicode breaks most Base64 tools
The browser's built-in btoa() only accepts Latin-1. Give it a single emoji or a character like “é” and it throws. This tool encodes to UTF-8 bytes first, so any text works.
URL-safe Base64
Standard Base64 uses + and /, both of which have special meaning in URLs, and = padding that often gets stripped. The URL-safe variant (RFC 4648 §5) substitutes - and _. Our decoder accepts either alphabet automatically and restores missing padding.
Base64 is not encryption
It is an encoding, fully reversible by anyone. It exists to move binary data safely through text-only channels like email or JSON — never use it to protect a secret.
Size cost
Base64 makes data about 33% larger, since every 3 bytes become 4 characters. That matters when inlining images as data URIs: below roughly 2 KB the saved HTTP request is usually worth it, above that it usually is not.
Frequently asked questions
Is Base64 a form of encryption?
No. It is a reversible encoding that anyone can decode instantly. It exists to move binary data through text-only channels, not to protect secrets. Never use it to hide sensitive information.
Why do other tools fail on emoji or accented characters?
The browser's built-in btoa() only handles Latin-1 and throws on anything above U+00FF. This tool encodes to UTF-8 bytes first, so all Unicode works.
What is URL-safe Base64?
A variant that replaces + and / with - and _, because the standard characters have special meaning in URLs. Our decoder accepts either alphabet automatically.
How much bigger does Base64 make my data?
About 33% — every 3 bytes become 4 characters. For inline images, below roughly 2 KB the saved request is usually worth it; above that it usually is not.