Base64 vs Base64URL: How to Encode and Decode UTF-8 Text
Encode UTF-8 text as standard Base64 or Base64URL, and decode it back to text directly in your browser.
When to use Base64
Base64 represents bytes with printable ASCII characters. It is useful when a text-only interface needs to carry binary data. Encoding adds roughly a third to the byte length, so it is generally unsuitable for reducing file size.
Choose the alphabet expected by your receiver
Standard Base64 uses + and /. Base64URL uses - and _ in those positions and frequently omits trailing padding. Match the format required by your API or token specification. The two alphabets are documented in RFC 4648.
Try a UTF-8 example
Paste Bună and select Encode Base64. The result is QnVuxIM=. Paste that result back and select Decode Base64 to recover the original text. The tool converts Unicode to UTF-8 bytes before encoding, which preserves accented characters and emoji.
Diagnose decoding errors
Check the alphabet, padding and any unexpected punctuation. A valid Base64 string can contain image bytes or another binary format that cannot be displayed as UTF-8 text. For those payloads, use a decoder designed to write binary files. Anyone can decode Base64, so use encryption or an approved secret store when confidentiality matters.
Open the Base64 Encoder & Decoder to try the workflow in your browser.
Ready to Format Data Faster?
Experience instant, 100% private in-browser delimiter tools, SQL conversions, and file converters with zero server uploads.