Base64 Encoder / Decoder
Encode text to Base64 or decode it back — UTF-8 safe, in your browser.
What you provide
No network requests are made from this pageHow this works
Encoding converts your text to its UTF-8 bytes and expresses them in the 64-character Base64 alphabet, which is safe to carry anywhere that expects plain ASCII. Decoding reverses it. Unlike the browser’s built-in btoa, this goes through a UTF-8 step, so emoji and accented characters work rather than throwing.
What the results mean
- Encode
- Text in, Base64 out. Used to embed data in URLs, JSON and data URIs where arbitrary bytes are not allowed.
- Decode
- Base64 in, original text out. Also accepts URL-safe Base64 and fixes missing padding, both common in tokens.
Frequently asked questions
Is Base64 encryption?
No, and this is the most important thing to understand about it. Base64 is a reversible encoding with no key and no secret. Anyone can decode it instantly. It makes data transport-safe, not private — never use it to hide anything sensitive.
Why does the browser’s atob break on some strings?
The built-in atob/btoa only handle Latin-1 characters, so any emoji or accented letter throws. This tool routes through UTF-8 encoding first, which is why it handles real-world text correctly.
Can I decode a JWT here?
You can decode the header and payload segments — they are Base64URL, which this tool accepts. But that only reveals what is already public in the token; the signature is what actually protects it, and decoding does not verify it.
Put this on your own site
Free to embed, no attribution required beyond the source link the frame carries itself. It runs entirely in your visitor's browser, sets no cookies and loads no third-party script.
<iframe src="https://runthetests.com/embed/base64-encode-decode/" width="100%" height="560" style="border:1px solid #e5e5e5;border-radius:8px" title="Base64 Encoder / Decoder" loading="lazy"></iframe>
Preview it at https://runthetests.com/embed/base64-encode-decode/. Embedded pages are marked noindex, so yours stays the canonical copy — not this one.