Last updated: October 2026
Base64 encoder decoder online free — Unicode-safe
What is Base64, exactly?
A–Z, a–z, 0–9, + and /, with = as padding. It takes 3 input bytes (24 bits) and re-groups them into 4 chunks of 6 bits — each chunk (0–63) picks one character of the alphabet. So Man → TWFu. It exists so binary data can travel through systems designed for text only: email (SMTP), JSON payloads, HTTP headers, XML and URLs.Why Unicode-safe matters
Many online Base64 tools use the browser's btoa() directly on text, which corrupts anything outside basic Latin — emoji become garbage, Chinese/Arabic/Urdu text breaks. This tool encodes text as UTF-8 bytes first, so every script round-trips perfectly. If another tool mangled your text, paste its output here in Decode mode — if the bytes are valid UTF-8 you'll get your text back.
Standard vs URL-safe Base64
Standard Base64 uses +, / and = padding — all of which have special meaning inside URLs. URL-safe mode swaps +→-, /→_ and drops the padding, so the output can go straight into a query string, JWT-style token or filename. Decoding auto-detects both variants. If your payload also needs percent-encoding, our URL encoder/decoder handles that separately. JWT-style tokens are the most common URL-safe payload — their expiry timestamps can be read with our Unix timestamp converter.
Why decoding sometimes returns gibberish
A frequent surprise: you decode a Base64 string and get mojibake instead of text. That usually means the original input wasn't text — Base64 commonly wraps images, PDFs or certificates, and decoding those gives raw binary, not words. The decoder did its job; only text encoded as UTF-8 (which is what this tool produces) decodes back into readable characters.
Frequently asked questions
How do I encode text to Base64?
How do I decode Base64?
What is URL-safe Base64?
Does it handle emoji and non-English text?
Is my data private?
Why does Base64 make data about 33% bigger?
What do the = signs at the end of Base64 mean?
= characters are added to make the output a multiple of 4: 1 leftover byte gets == (M → TQ==), 2 leftover bytes get = (Ma → TWE=), and a multiple of 3 gets none (Man → TWFu). URL-safe variants like JWTs usually drop the padding entirely.Where is Base64 actually used?
data:image/png;base64,…), JWT tokens encode their header and payload in Base64url, email attachments ride inside MIME parts as Base64, HTTP Basic Auth sends username:password encoded, JSON APIs accept file uploads as Base64 strings, and PEM certificate files wrap Base64-encoded keys.