Base64

Base64 to Image

Details

How to use Base64 to Image

What the tool does, how to run it, and what to expect from the result.

How to decode Base64 back into an image

The tool takes a data URL or a raw Base64 payload, decodes it to bytes in the browser, wraps them in a Blob with the right MIME type, and gives you a preview plus a download. Nothing is uploaded.

If it will not decode, check the alphabet before anything else. A base64url string from a JWT or a URL parameter uses - and _ where standard Base64 uses + and /, and the decoder will reject it.

  • Paste the data URL or the raw Base64 payload (line breaks and spaces are fine).
  • If there is no data URL prefix, choose the fallback format: PNG, JPG, WebP, GIF, or BMP.
  • Decode and look at the preview to confirm it is the image you expected.
  • Download the rebuilt file.
  • If it fails, check for base64url characters or a truncated tail.

About this Base64 to image converter

When you have a Base64 string or data URL, this tool rebuilds the image locally so you can preview and download it. Choose a fallback format if the payload has no MIME type.

Tips

Getting a better result out of Base64 to Image

Specific settings and thresholds, not general advice.

  • The decoder expects standard Base64. A base64url payload (the kind found in JWTs and URL parameters, using - and _ instead of + and /) will fail to decode, so swap those two characters back before pasting.
  • Whitespace and line breaks are stripped before decoding, so a string copied out of a wrapped source file or an email body works fine without cleaning it up first.
  • The MIME type is taken from the data URL prefix when there is one. If you paste a raw payload with no prefix, the tool uses the fallback format you selected, and picking the wrong one gives you a file with the wrong extension that some viewers will refuse to open.
  • A data URL that is not base64-encoded (for example data:image/svg+xml,%3Csvg...) will not decode here, because it is percent-encoded text rather than Base64. Decode it with a URL decoder instead.
  • If the decode fails, the usual cause is a truncated string. Base64 length is always a multiple of 4 after padding, so a payload copied out of a log or a console that clipped the tail will not decode.
Limits

What Base64 to Image does not do

The honest boundary, so you do not lose time finding it yourself.

  • Standard Base64 only. base64url (- and _) is not converted automatically.
  • It does not handle percent-encoded data URLs such as inline SVG.
  • One payload at a time. There is no batch decode.
  • It cannot repair a truncated or corrupted string.
Reference

Terms used on this page

Short, plain-language definitions for the formats and settings above.

At a glance

Who Base64 to Image is for

A quick way to understand who this helps, what it solves, and where it connects next.

Best fit

Developers and support teams decoding Base64 image payloads for debugging or reuse.

Ideal for

Rebuilding an image from a data URL or raw Base64 payload and downloading it.

FAQ

Common questions

Short answers for the questions people usually have before trying a utility like this.

Can I paste a full data URL?

Yes. Paste either a full data URL or just the raw Base64 payload and the image is rebuilt locally.

Is the payload uploaded anywhere?

No. Decoding, preview, and download all happen in your browser.

Why does my string fail to decode?

Usually one of three reasons: it is base64url rather than standard Base64 (using - and _ in place of + and /), it was truncated when copied out of a log or console, or it is a percent-encoded data URL rather than a base64 one. Whitespace is not the problem, since that is stripped automatically.

How do I get the right file extension?

Include the data URL prefix and the extension follows from the MIME type. Without a prefix, choose the fallback format (PNG, JPG, WebP, GIF, or BMP) that matches what the payload really is. Choosing wrong gives you a correctly decoded file with a misleading name.

Can I check what an image is before saving it?

Yes, the decoded image is previewed before you download, which is the usual point of the tool when you are debugging a payload from an API response or a log.

Is the payload sent anywhere?

No. Decoding, previewing, and downloading all happen in the browser, so a payload from a private system stays on your machine.

Recommendations

You Might Also Like

Nearby tools from the catalog that fit the same job or workflow.

Cleanor app

Do it all on your device

Cleanor puts these tools in one app: compress and convert images, video, and audio, work with PDFs, and scan text right on your device. Plus free up storage and clear inbox clutter with Email Cleaner. Start with a free trial.

  • iPhone
  • Android
  • Macsoon
  • Windowssoon