Base64 Encoder / Decoder
Pairs well with
About Base64 Encoder / Decoder
Encode any text to Base64 or decode a Base64 string back to the original. Handles UTF-8 properly, supports URL-safe Base64, runs entirely in your browser.
Base64 is a way to represent binary data using only ASCII characters — used for embedding images in CSS / HTML data URIs, encoding email attachments (MIME), passing tokens through URL-unsafe transports, and hundreds of other places. The 'URL-safe' variant (`-` and `_` instead of `+` and `/`) is what JWT tokens use.
This tool uses the browser's native `btoa` / `atob` (with a TextEncoder hop for proper UTF-8 handling — `btoa` alone fails on emoji and non-Latin text). No server round-trip. Encoding inflates the size by ~33% (3 bytes → 4 chars).
Common questions
Why does my emoji break with btoa?
Native btoa only handles Latin-1 (codepoints 0-255). For UTF-8 strings (emoji, CJK, Cyrillic), you need to encode to bytes first. This tool does that automatically.
Is Base64 encryption?
No — it's encoding, not encryption. Anyone can decode Base64 trivially. Use it for transport, not for security.
Everything happens on your device. Close the tab and it's gone.