Base64 Encode/Decode
Encode or decode Base64 for text and files, Unicode-safe.
Related Tools
Percent-encode text for safe use in URLs.
Decode JWT header, payload, and signature with expiry and algorithm warnings.
Decode percent-encoded URL text back to plain text.
Escape HTML entities to safely display raw markup as text.
Unescape HTML entities back to raw characters.
Frequently Asked Questions
Why not just use btoa/atob directly?▾
Native btoa() throws on any character outside Latin1, so it breaks on emoji or non-Latin text. This tool encodes via TextEncoder first, making it Unicode-safe.
What is the URL-safe variant?▾
Standard Base64 uses + and / characters, which have special meaning in URLs. The URL-safe variant replaces them with - and _ and drops padding, so the result can be used directly in a URL path or query string.
Can I encode a file, not just text?▾
Yes — click Load File to read any file as bytes and encode it, useful for embedding small images as data URIs.
What happens if I paste invalid Base64 to decode?▾
The tool reports "Invalid Base64 input" rather than silently producing garbage.
Is my data uploaded anywhere?▾
No — encoding and decoding both happen entirely in your browser.