Convert Base64 to JSON, CSV or Hex

To convert Base64 to JSON, you decode the Base64 text back into the structured data it was wrapped from. Base64 is often used to carry a JSON payload, a CSV file, or raw bytes through systems that only handle plain text, and the result is an unreadable string until you decode it. This guide shows how to convert Base64 to JSON, CSV, hex, and plain text, with a free tool for each, and what to check when the decoded result still does not look right.

Base64 as a wrapper around data

Base64 does not change what data is, only how it is written. A JSON object, a CSV table, or a block of bytes gets rewritten as a single text string so it can ride safely inside an API response, a token, or a database field. To use that data again, you decode it back to its original form. The background on the encoding itself is in our guide to Base64 encoding.

The converters below each assume a different thing is hiding inside the string, and they decode it accordingly.

Convert Base64 to JSON

This is the most common case for developers. API payloads, configuration, and the body of a JWT token are frequently JSON wrapped in Base64. The Base64 to JSON converter decodes the string and returns the JSON, ready to read or validate.

A quick signal: a Base64 string that begins with the characters eyJ is almost always JSON, because that is how an opening brace and quote encode. It is exactly why JWT tokens start that way. If yours starts with eyJ, expect JSON on the other side. To then check the structure, our guide to JSON and CSV tools covers the analyzer.

Convert Base64 to CSV

Tabular data is also carried this way, often when a spreadsheet export is attached to a request or stored as a single field. The Base64 to CSV converter decodes the string back into rows and columns you can open in a spreadsheet program.

Convert Base64 to hex

Sometimes you need the underlying bytes rather than a guessed format. The Base64 to hex converter shows the decoded data as hexadecimal, two characters per byte. This is the tool to reach for when you are inspecting unknown data and want to see its raw bytes, since hex reveals file signatures and structure that text would hide.

Convert Base64 to plain text

When the data is simply text, two converters return it directly. The Base64 to UTF-8 converter handles modern text with accents, other alphabets, and symbols, while the Base64 to ASCII converter is fine for plain English. If your decoded text shows odd characters where accents should be, switch to the UTF-8 tool.

Decoded but still unreadable

If a string decodes without error but the result is still gibberish, the data was probably not plain text or JSON to begin with. The most common reasons are that it was compressed before encoding, or encrypted, in which case decoding Base64 only removes the outer text wrapper and leaves the compressed or encrypted bytes underneath. Viewing it as hex often makes this clear, since a recognisable file signature at the start tells you what the real format is.

Free Base64 converters used in this guide

Frequently asked questions

How do I convert Base64 to JSON?

Paste the string into a Base64 to JSON converter. It decodes the text and returns the JSON it was wrapped from, ready to read or validate.

Why does my Base64 string start with eyJ?

Because eyJ is how an opening brace and quote encode in Base64, so a string starting with it is almost always JSON. JWT tokens start this way for the same reason.

What if the decoded data is still unreadable?

The data was likely compressed or encrypted before encoding. Decoding Base64 removes only the text wrapper, leaving those bytes underneath. Viewing it as hex helps identify the real format.

Should I use the ASCII or UTF-8 converter?

Use UTF-8 for text with accents, other alphabets, or symbols. ASCII is fine for plain English. If accents look wrong, switch to UTF-8.

Is decoding Base64 reversible?

Yes. Base64 is a lossless wrapper, so the decoded data is exactly what was encoded, with nothing added or removed.

Convert Base64 to Image or PDF

To convert Base64 to an image, you decode the text back into the picture it was made from. Base64 is a way of writing binary data, like a photo or an icon, as plain text so it can travel inside HTML, CSS, JSON, or an email. That text looks like a long random string, but it is a complete image waiting to be turned back. This guide shows how to convert Base64 to an image or a PDF, and what to do when the string will not decode.

Why files become Base64

Many systems only handle plain text safely. Email bodies, JSON payloads, and the data URLs embedded in web pages were all built around text, and raw binary sent through them can be corrupted. Base64 solves that by rewriting the binary file as text characters, so an image can be carried inside a line of CSS or a JSON field. The trade-off is size, since Base64 text is about a third larger than the original, and that it is unreadable until decoded. The full background is in our guide to Base64 encoding.

When you receive data in that form, you need to reverse it, and that is exactly what these converters do.

Convert Base64 to an image

The Base64 to image converter takes a Base64 string and rebuilds the original picture, which you can then view or save as a normal file. It handles the common formats, so a string that started as a PNG comes back as a PNG and a JPEG comes back as a JPEG. You paste the string, and the image appears.

If your data is specifically a WebP image, the Base64 to WebP converter rebuilds it in that format directly.

Preview a Base64 image

Sometimes you only need to see what a Base64 string contains, not save it. The Base64 image preview tool renders the image straight from the string so you can check it at a glance. This is handy when you are debugging and have a long encoded value but no idea what picture is hiding inside it.

Convert Base64 to PDF

Images are not the only files encoded this way. Documents are often carried as Base64 inside API responses and stored data. The Base64 to PDF converter decodes the string back into a working PDF you can open and save, the same idea as the image converter applied to documents.

When the string will not decode

If a converter rejects your string, the cause is usually one of two things. The first is the data URL prefix. A Base64 image copied from a web page often starts with something like data:image/png;base64, before the actual data. That prefix is not part of the Base64 itself, and some tools want only the part after the comma.

The second is a broken or incomplete string, where characters were lost in copying or the padding equals signs at the end were cut off. A quick way to sanity-check what you have: a Base64 PNG begins with the characters iVBOR, and a Base64 JPEG begins with /9j/. If yours starts with one of those, the data is probably intact and the prefix is the thing to remove.

Free Base64 converters used in this guide

Frequently asked questions

How do I convert a Base64 string to an image?

Paste the string into a Base64 to image converter. It decodes the text back into the original picture, which you can then view or save as a file.

What does the data:image prefix mean?

It is a data URL prefix that marks the string as an embedded image. It is not part of the Base64 data, and some converters want only the part after the comma.

Can I tell what format a Base64 image is?

Often yes. A Base64 PNG starts with the characters iVBOR, and a Base64 JPEG starts with /9j/, which gives away the format before you decode it.

Why is my Base64 string larger than the original file?

Base64 represents three bytes of data as four text characters, so the encoded text is about a third larger than the file it came from.

Can I convert Base64 back to a PDF?

Yes. A Base64 to PDF converter decodes the string into a working PDF document you can open and save.