🔁 Base64 Encoder / Decoder
Convert text to Base64 and back, fully UTF-8 safe, right in your browser — handy for data URIs, config snippets, tokens, and any payload that has to travel as plain text.
🔤 Encode & Decode Base64
What is a Base64 Encoder?
A Base64 encoder rewrites data using a 64-character alphabet so it can pass through text-only channels without being mangled. It is the format behind inline images in HTML and CSS, attachments in email, and many tokens and payloads exchanged over HTTP.
Remember that Base64 is reversible by anyone — it obscures nothing. Use it to make binary or Unicode data portable, not to keep it secret. For confidentiality, reach for real encryption instead.
❓ Frequently Asked Questions
What is Base64 used for?
Base64 encodes binary or text data using only 64 printable ASCII characters, so it can travel safely through channels that expect text — email bodies, JSON and XML payloads, data URIs in HTML and CSS, and HTTP headers. It is an encoding, not encryption: anyone can decode it, so it protects transport integrity, not secrecy.
Is this Base64 tool UTF-8 safe?
Yes. Text is first encoded to UTF-8 bytes with TextEncoder before being Base64-encoded, and decoded back through TextDecoder. That means accented characters, non-Latin scripts such as Chinese or Arabic, and emoji all survive a full round-trip without corruption — a common failure of naive btoa/atob usage.
Does my text get sent to a server?
No. All encoding and decoding happens locally in your browser using the built-in TextEncoder, TextDecoder, and Base64 functions. Nothing you type is uploaded, logged, or stored, which makes it safe for pasting snippets you would rather keep on your own machine.
Why does decoding sometimes fail?
Decoding fails when the input is not valid Base64 — for example it contains characters outside A–Z, a–z, 0–9, + and /, or has incorrect padding. Check that you copied the whole string, that no stray spaces or line breaks slipped in, and that any URL-safe variant (which uses - and _) has been converted back to standard Base64 first.