Base64 Encoder and Decoder

Convert text to Base64 or decode Base64 back to text. Handles accented and Unicode characters correctly.

What Base64 is

Base64 is a way of representing binary or text data using only 64 safe characters — letters, numbers and a couple of symbols. It is not encryption and provides no security; it is an encoding that lets data travel safely through systems that only handle text, such as email, JSON payloads, data URLs and HTTP headers. This tool converts text to Base64 and decodes Base64 back to readable text.

When you need Base64

Developers encounter Base64 constantly. Email attachments are Base64-encoded so binary files survive text-only mail transport. Small images are embedded directly in CSS or HTML as Base64 data URLs to save a request. Basic authentication headers carry Base64-encoded credentials. JSON Web Tokens use Base64 for their segments. When you need to inspect or create any of these, encoding and decoding by hand is impractical — this tool does it instantly.

Unicode handled correctly

A common bug with Base64 tools is mangling accented or non-Latin characters, because naive encoding assumes plain ASCII. This tool encodes through UTF-8 first, so accented letters, emoji and characters from any language survive the round trip intact. You can encode "café" or text in any script and decode it back exactly as it was.

Base64 is not encryption

It is worth stressing: Base64 is trivially reversible and offers no protection. Anyone can decode it in a second — including with this tool. Never use Base64 to hide passwords or sensitive data thinking it is secure. It is purely a transport encoding, useful for making data text-safe, not for keeping it secret. For actual security you need real encryption, which is a different thing entirely.

How Base64 encoding works

Base64 takes binary data and represents it using 64 printable characters — A to Z, a to z, 0 to 9, plus and slash — with the equals sign as padding. Every three bytes of input become four Base64 characters, which is why encoded data is about a third larger than the original. This expansion is the trade-off for making any data safe to embed in text-only contexts. Decoding reverses the process exactly, recovering the original bytes.

Data URLs and embedding images

One everyday use of Base64 is the data URL, which embeds a small file directly in HTML or CSS instead of linking to it. A small icon encoded as a Base64 data URL loads with the page rather than requiring a separate request, which can speed up rendering for tiny assets. Developers paste image data, encode it, and drop the result into a src attribute. For larger files the size penalty outweighs the benefit, but for small icons and inline SVGs it is a common technique.

Base64 in tokens, emails and APIs

Base64 appears throughout web development. JSON Web Tokens encode their header and payload segments in Base64 so they travel safely in headers and URLs. Email attachments are Base64-encoded so binary files survive text-based mail transport. HTTP Basic Authentication encodes credentials in Base64. APIs sometimes accept or return Base64-encoded binary data inside JSON. When you need to inspect or construct any of these, this tool encodes and decodes instantly, handling Unicode correctly so nothing is corrupted.

Frequently asked questions

Is Base64 a form of encryption?
No. Base64 is an encoding, not encryption. It is trivially reversible by anyone and provides no security whatsoever. Use it to make data text-safe for transport, never to protect or hide sensitive information.
Does it handle accented characters and emoji?
Yes. The tool encodes through UTF-8, so accented letters, emoji and characters from any language survive encoding and decoding intact. Many simpler tools corrupt these characters; this one does not.
Why would I need to decode Base64?
To inspect the contents of things that use it — email attachments, data URLs, basic auth headers, or the segments of a JSON Web Token. Decoding turns the safe-transport string back into readable text or data.
What does an invalid Base64 error mean?
It means the input is not valid Base64 — usually because it contains characters outside the Base64 alphabet or has the wrong padding. Check that you pasted the complete string without extra spaces or line breaks.
Is my data uploaded?
No. Encoding and decoding happen entirely in your browser. Your data never leaves your device, so it is safe even for content you would not upload.
Why is Base64 data larger than the original?
Base64 represents every three bytes as four characters, so the encoded output is roughly 33% larger than the input. This size increase is the cost of making binary data safe to transmit as text.
What is a Base64 data URL?
It is a way to embed a file's contents directly in HTML or CSS using its Base64 encoding, so a small image or icon loads with the page instead of as a separate request. It is most useful for tiny assets.
Can I decode a JWT with this?
You can decode the Base64 segments of a JSON Web Token to read its header and payload. Note that this only decodes — it does not verify the token's signature, which requires the secret key.
Does it corrupt accented characters or emoji?
No. The tool encodes through UTF-8, so accented letters, emoji and any-language text survive encoding and decoding intact, unlike simpler tools that assume plain ASCII.