Base64 Encoder / Decoder
Type or paste text to encode it as Base64, or switch to Decode mode to turn a Base64 string back into readable text. The result updates as you type — no button to press.
How to use
Base64 turns arbitrary bytes into plain ASCII text using 64 safe characters (A–Z, a–z, 0–9, + and /). It's used to embed binary data — images, files, credentials — inside text formats like JSON, XML, URLs and email, which can't safely carry raw bytes.
This tool encodes and decodes full Unicode text correctly (emoji, Cyrillic, Chinese, accented letters), unlike the browser's built-in btoa()/atob(), which only handles plain ASCII and throws errors or produces garbage on anything else.
FAQ
What is Base64 encoding used for?
Embedding binary data in text-only formats: image data URIs in CSS/HTML, file attachments in email (MIME), authentication headers (Basic Auth), and JSON Web Tokens. It makes data safe to transmit through systems that only handle text.
Why does Base64 make text longer?
Each group of 3 input bytes becomes 4 output characters, so encoded data is roughly 33% larger than the original. That overhead is the price of using only printable ASCII characters.
Why do I get 'not valid Base64' when decoding?
The input has characters outside the Base64 alphabet, incorrect padding (missing trailing '='), or extra whitespace/line breaks the decoder doesn't expect. Copy the string exactly as it was generated.
Is Base64 encryption?
No — it provides zero security. Anyone can decode Base64 instantly; it only changes the representation of data, not its confidentiality. Never use it in place of real encryption.