Decode a Raw Base64 String (No data: Prefix Needed)

If your string starts with iVBORw0KGgo instead of data:image/png;base64,, you are in the right place. This decoder never asks you to add a prefix.

Any format accepted: prefixed, raw, wrapped, URL-encoded, URL-safe, or broken.

Decoding options — auto-detected by default; override only when the result looks wrong

Treats - and _ as the URL-safe alphabet (+ and /). Leave it off for ordinary Base64 that happens to contain those characters.

Skips signature detection. Use it when the bytes are a valid image that the signature check does not recognise.

Your image appears here

Paste on the left — no button to press. Everything stays in your browser.

When you need this

  • A database column or JSON field stores only the encoded payload, with the MIME type kept separately.
  • You copied the value out of a SQL client or a message queue viewer that strips the wrapper.
  • You are checking whether a stored blob is a real image before writing a migration.

Why other Base64 converters fail here

The prefix is the only signal many tools use to pick a decoder. Without it they either refuse the input or treat the whole thing as plain text.

Some demand you guess the MIME type from a dropdown before they will attempt anything — which is backwards, since the bytes already say what they are.

Others prepend data:image/png;base64, unconditionally, so a JPEG payload ends up mislabelled and possibly rendered as a broken image.

Frequently asked questions

How can you know the format without being told?

Every common image format starts with a fixed byte signature. PNG begins with 89 50 4E 47, JPEG with FF D8 FF, GIF with 47 49 46 38, and so on. Base64 decoding the first few characters is enough to read that signature, so the format follows from the data itself.

My string has no prefix and no padding at the end. Is that a problem?

No. Padding is only there to make the length a multiple of four, and plenty of encoders omit it. The decoder adds it back automatically and tells you that it did, so you are not left guessing whether the input was touched.

The string looks like Base64 but the result is not an image.

That is a real possibility and the tool says so plainly rather than showing a broken image. It reports the decoded size and the first 32 bytes in hex. If those bytes start with 1F 8B it is gzip data; if they start with 50 4B it is a ZIP. Neither is an image, and no amount of prefix-adding will change that.

Can I paste a whole log line instead of just the string?

Usually yes. If the surrounding text is clearly a label — something like image: or a timestamp — the decoder isolates the longest contiguous Base64 run and tells you that it discarded the rest. It is deliberately conservative: when the extra characters are in the middle of the payload rather than around it, it reports an error instead of quietly handing you a truncated image.

Related tools