Base64 Encoder & Decoder

Encode text to Base64 and decode it back — with proper UTF-8 handling (Chinese and emoji won't break) and an URL-safe mode. Everything stays in your browser.

Input

Output

FAQ

Is my data uploaded?

No. Encoding is built into your browser — tokens, credentials and payloads stay on your device.

Why do other tools mangle Chinese text?

JavaScript's native btoa() only handles Latin-1. This tool routes through TextEncoder/TextDecoder, so any UTF-8 text — Chinese, emoji, Arabic — round-trips correctly.

When do I need URL-safe Base64?

When the encoded value goes into a URL or filename (JWTs, tokens in links) — standard Base64's + and / characters break URLs, so they're swapped for − and _.