What is Base64 encoding?
Base64 represents arbitrary bytes using 64 text-safe characters (A–Z a–z 0–9 + /), so binary or Unicode data can travel through channels that only handle plain text: JSON strings, HTTP basic auth, data URIs, email attachments. It inflates size by ~33% and provides no secrecy: it's a format, not a cipher.
Edge cases & gotchas
- JavaScript's raw
btoa()throws on non-Latin1 characters. Encode to UTF-8 bytes first (this tool does). - URL-safe Base64 swaps
+ /for- _(used in JWTs); our decoder accepts both. - Base64 output is ~33% larger than the input, so don't Base64 large payloads needlessly.
How to use
- Paste text, JSON, or any string into the Input pane.
- The Base64 output appears instantly: standard alphabet with padding.
- Input is UTF-8 encoded first, so emoji and accented characters survive the round-trip.
- Copy or download the result.
Examples
Encode text
hello
aGVsbG8=
Encode JSON (UTF-8 safe)
{ "café": "☕" }eyAiY2Fmw6kiOiAi4piVIiB9
FAQ
Is Base64 encryption?
No. It's an encoding, freely reversible by anyone. Never use it to protect secrets; it only makes binary/text safe for transport in text-only channels.
How does this handle emoji and non-ASCII text?
Input is converted to UTF-8 bytes first (the common cause of broken btoa results), so any Unicode text round-trips correctly.
Why does the output end with = signs?
Padding: Base64 emits 4 characters per 3 bytes, and = pads the final group. Some systems (JWTs) strip it.
Is my data uploaded?
No. Encoding runs entirely in your browser. Verify zero network requests in DevTools.