Base64 Decoder

Decode Base64 to plain text, to hex, or to formatted JSON. UTF-8 is handled correctly, URL-safe input is accepted, and missing padding is restored. Everything happens in your browser.

How do I decode a Base64 string?

Decoding Base64 to text, hex or JSON

Base64 turns arbitrary bytes into 64 printable characters so they can pass through channels built for text. Decoding reverses it. What you want out the other end depends on what went in, and the three modes here cover the cases that come up in practice.

Text, and the UTF-8 trap

Plain text is the common case, and it has one persistent problem. JavaScript's built-in atob produces Latin-1, so every character above U+00FF comes back mangled — accented letters, CJK text and emoji all turn into mojibake. That is why a string that decodes perfectly in Python looks broken in a browser console. This page decodes the bytes and then interprets them as UTF-8, which is what almost everything actually produces, so the output matches what you would get from base64 -d at a shell.

Hex, for when it is not text at all

Decoding Base64 to hex is what you want when the payload is binary and you need to look at the bytes: checking a file signature, inspecting a protocol frame, comparing a key against a known value. The output is grouped sixteen bytes to a line, which is the layout every hex dump uses and the one that makes a signature at the start of the data easy to spot.

JSON, for tokens and API payloads

A great deal of Base64 in day-to-day work is a JSON object — the payload segment of a JWT, a config blob, an encoded webhook body. The JSON mode decodes and then formats it with indentation, so the shape is readable immediately. If it will not parse, you get the raw text and the parser's complaint rather than an empty box, which is usually enough to see what is wrong.

What this page is not for

If your string decodes to a file rather than to characters — a PNG, a JPEG, a PDF — Base64 to image is the page for it: it detects the type from the magic bytes and hands you the file. To go the other way, the Base64 encoder produces the string. And it is worth restating that Base64 is not encryption: it has no key and reverses in one call, so anything genuinely secret needs real encryption, not an encoding.

Next steps

Related tools

What to do with the result

Browse all developer utilities, or see every QuickMerge tool.

Frequently asked questions