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 is a way to represent binary data using only 64 printable ASCII characters (A-Z, a-z, 0-9, plus '+' and '/'). It is used to embed images in CSS, send binary data through text-only channels like email, and pack credentials into URLs and JSON.
Does base64 encrypt my data?
No. Base64 is encoding, not encryption. Anyone can decode a base64 string back to the original bytes in seconds. Never use it to hide passwords, API keys, or anything else that needs to stay secret. For that you want real encryption like AES-GCM.
What is the difference between standard and URL-safe base64?
Standard base64 uses '+' and '/' as its last two characters, which have to be percent-encoded inside URLs and break filenames on most systems. URL-safe base64 (RFC 4648 section 5) swaps them for '-' and '_' so the output drops straight into URLs, JSON Web Tokens, and file paths without further escaping.
Why does my encoded string end with one or two equals signs?
Base64 packs every three input bytes into four output characters. When the input length is not a multiple of three, the encoder pads the last group with '=' so the output stays a multiple of four. One leftover byte produces two '=' chars; two leftover bytes produce one. Stripping the padding is safe as long as the decoder accepts unpadded input, which most do.
Can base64 handle non-English characters like accented letters or emoji?
Yes, but only if the text is first converted to UTF-8 bytes, which this tool does for you. Accented letters become 2-byte sequences, common emoji become 4-byte sequences, and each byte gets packed into the base64 output. Old browser tricks like btoa(str) crash on anything outside Latin-1, which is why this tool runs the text through TextEncoder before encoding.