Base64 Encode and Decode
Encode and decode Base64 / Base64URL with correct UTF-8 handling.
About this tool
Base64 turns arbitrary bytes into plain ASCII text, so binary data can travel through JSON, email, data URLs or HTTP headers. Text is encoded as UTF-8 first, so accented letters, emoji and non-Latin scripts round-trip correctly, which the browser's built-in btoa cannot do on its own.
The URL-safe variant (Base64URL) swaps + and / for - and _ and drops the = padding, which is the form used in JWTs and query strings. Decoding accepts either variant, ignores whitespace and tolerates missing padding.
Base64 is an encoding, not encryption: anyone can decode it, so never use it to hide passwords or secrets.
How to use it
- Paste text to encode, or a Base64 string to decode.
- Turn on URL-safe if the result goes into a URL or a JWT.
- Encode or decode, then copy the output.
Example
Input:
Hello, wörldBase64:
SGVsbG8sIHfDtnJsZA==