Base64 Encode / Decode
Encode and decode Base64 text, URL-safe Base64 and data URIs, and convert any file to Base64 and back.
🔒 Runs in your browser — files never leave your deviceFree · No sign-up
Encoding text as Base64
Input
Output
0 BInput
0 BOutput
—Size change
File → Base64
Drop a file here, or click to choose
Any file type — it never leaves your browser
Base64 → File
Nothing to save yet.
How to use the Base64 converter
- On the Text tab, paste text to encode it — or paste Base64 and the tool decodes it automatically.
- Tick URL-safe for tokens that travel in a URL, or Wrap at 76 characters for MIME-style output.
- On the File tab, drop any file to get its Base64 (or a ready-made
data:URI), and paste Base64 back to download the original file.
FAQ
Does it handle emoji and Chinese text?
Yes. Text is converted to UTF-8 bytes before encoding, so 中文, emoji and accented letters survive a round trip — unlike btoa() on its own, which throws on anything above U+00FF.
What is URL-safe Base64?
The RFC 4648 “base64url” alphabet swaps + and / for - and _ and usually drops the = padding, so the value can be used in a URL path, a query string or a JWT without being escaped. Decoding accepts either alphabet.
Is Base64 encryption?
No — it is just a way to carry binary data through text-only channels, and anyone can decode it. Never use it to hide passwords or tokens.