Tech
Base64 Encoder / Decoder
Encode text to base64 or decode base64 back to text. Supports UTF-8, URL-safe alphabet, and optional padding. Runs locally in your browser.
Encode and decode base64
Conversion runs locally in your browser. Nothing is sent to a server.
Frequently Asked Questions about the Base64 Encoder / Decoder
What is base64 encoding?
Base64 represents binary data using 64 printable ASCII characters: A-Z, a-z, 0-9, plus "+" and "/". Three input bytes become four output characters, so any file, image, or text can travel through channels that only accept plain text. Common uses include embedding images in CSS data URIs, packing credentials into HTTP headers, and serializing binary data inside JSON.
Does base64 encrypt my data?
No. Base64 is encoding, not encryption. Anyone can decode a base64 string back to the original bytes instantly with no key required. Never use it to protect passwords, API keys, or anything sensitive. If you need confidentiality, use a real encryption scheme like AES-GCM.
What is the difference between standard and URL-safe base64?
Standard base64 uses "+" and "/" as its 63rd and 64th characters. Those symbols must be percent-encoded inside URLs and break many file systems. URL-safe base64 (RFC 4648 section 5) replaces "+" with "-" and "/" with "_", so the output works directly in URLs, filenames, and JSON Web Tokens without any extra escaping. This decoder accepts both alphabets regardless of which mode you select.
Why does my encoded string end with one or two equals signs?
Base64 packs every 3 input bytes into 4 output characters. When the byte count is not a multiple of 3, the encoder pads the last group with "=" to keep the output length a multiple of 4. One leftover byte adds two "=" signs; two leftover bytes add one. You can strip the padding safely, since this decoder re-adds it automatically before decoding.
Can base64 handle non-English characters like accented letters or emoji?
Yes. The encoder converts your text to UTF-8 bytes first, then encodes those bytes. An accented letter like "e" with an acute accent becomes 2 bytes; a typical emoji becomes 4 bytes. All of those bytes encode fine. The older browser function btoa() skips the UTF-8 step and crashes on anything outside Latin-1, which is why this tool uses TextEncoder before encoding.