🔤 Base64 Converter
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 Converter?
A Base64 converter 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. If you open the kit offer below, it carries only the byte count and the Base64 form, never your text.
Why does decoding sometimes fail?
Decoding fails when the input is not Base64: it has a character outside A to Z, a to z, 0 to 9 and + / (or the URL-safe - _), it mixes the two alphabets, = padding sits in the middle, or the length leaves one character over, which means a character was lost or added when it was copied. Spaces, line breaks and missing padding are fine: the decoder ignores them. If the bytes inside are not UTF-8 text (an image, a key, compressed data), the tool says so and shows them as hex instead of printing garbled characters.
What is URL-safe Base64?
RFC 4648 section 5 defines a second alphabet that swaps + for - and / for _, because + and / have meanings in URLs and file names. In a URL query string a + is read as a space, so a standard Base64 value pasted into a link can arrive corrupted. JSON Web Tokens use the URL-safe alphabet with the trailing = padding removed. Pick URL-safe and untick padding to produce that form; the decoder reads either.