Base64
Encode text to Base64 or decode Base64 back to plain text.
Unicode-safe encoding
The encoder uses encodeURIComponent + unescape before calling btoa, which correctly handles multi-byte Unicode characters. Standard btoa fails on any character outside the Latin-1 range. The decoder reverses this with atob + decodeURIComponent. Input is trimmed before decoding, so trailing newlines from copied Base64 strings are tolerated.
| Input | Base64 output |
|---|---|
| Hello, World! | SGVsbG8sIFdvcmxkIQ== |
| {"key":"value"} | eyJrZXkiOiJ2YWx1ZSJ9 |
| café | Y2Fmw6k= |
| 🎉 | 8J+OiQ== |
Where Base64 is actually used
JWT tokens store their header and payload as Base64url strings (URL-safe variant that replaces + with - and / with _). HTTP Basic Auth encodes credentials as Base64(username:password). Data URIs embed binary assets in CSS or HTML as data:image/png;base64,… This tool uses standard Base64, not Base64url — the output will not match JWT payloads exactly.
Frequently Asked Questions
Your files stay on your computer. Dad promised.