πŸ” Base64 Encoder & Decoder

Full UTF-8 support (including emoji), optional URL-safe Base64URL mode, and an optional 76-column line wrap for MIME-compatible output. All work happens in your browser.

Mode:

          
⌨️ Ctrl/Cmd + Enter runs the conversion.

πŸ“š Base64 vs Base64URL quick reference

Character Standard Base64 Base64URL (RFC 4648 Β§5)
62nd+-
63rd/_
Padding= (required)= (usually dropped)
Safe in URL / JWT / filename?βŒβœ…

❓ FAQ

What is Base64?

An encoding that turns binary data into 64 printable ASCII characters. Used in email attachments, Basic auth headers, data URIs, and JSON payloads. Adds ~33% to the size.

When should I use Base64URL?

Anywhere Base64 will end up in a URL, query string, filename, or JWT. Standard Base64 breaks URLs because + and / have special meanings. Base64URL swaps them for - and _ and usually drops the = padding.

Does this support UTF-8 and emoji?

Yes. The encoder passes your input through TextEncoder (UTF-8) before Base64, so accented characters, CJK text, and emoji all round-trip correctly. Plain btoa does not handle UTF-8 on its own.

Is my data sent to a server?

No. All work happens in your browser using TextEncoder, TextDecoder, and native btoa/atob. Nothing is transmitted or stored.

Why does the output have = at the end?

That's padding. Base64 encodes in 3-byte groups to 4 characters. Inputs whose length isn't a multiple of 3 get padded with = so the output is always a multiple of 4. Base64URL usually drops this padding.

🧰 Related developer tools