Base64 Encoder / Decoder

Encode text to Base64 and back. Unicode-safe, and accepts base64url.

Runs locally in your browser. Your input is never sent anywhere.

Input

Output

What Base64 is for

Base64 represents arbitrary bytes using 64 printable ASCII characters, so binary data can travel through channels that only accept text — data URIs, email attachments, JSON fields, JWT segments. It is an encoding, not encryption: anyone can decode it, so it protects nothing.

Unicode

Text is converted to UTF-8 bytes before encoding, so accents, CJK and emoji all survive the round trip. Naive implementations call btoa directly, which only handles Latin-1 and throws on anything else — that is the usual cause of "InvalidCharacterError".

Base64 vs base64url

Standard Base64 uses + and /, which have meaning inside a URL. The URL-safe variant swaps them for - and _ and usually drops the = padding. Decoding here accepts either, and missing padding is restored automatically, so you can paste a JWT segment straight in.