/tools/base64-to-image

Base64 to Image

Turn a Base64 string back into an image you can see and save. Paste raw Base64 or a full data:image URI and the preview appears straight away, with the image type and dimensions.

Private & secure

How to use the Base64 to Image

01
Paste
Paste a Base64 string or a data URI.
02
Preview
The image appears instantly.
03
Download
Save it as a regular image file.

Raw Base64 or data URI: both work

A data URI already states its type, as in data:image/png;base64,iVBOR... A raw Base64 string doesn't, so the tool recognizes the format from its opening characters: /9j/ is JPEG, iVBOR is PNG, UklGR is WebP, R0lGOD is GIF, PHN2 or PD94 is SVG and Qk is BMP. Anything else is tried as PNG.

Spaces and line breaks are removed before decoding, so strings wrapped across many lines, as they often are in email source or terminal output, can be pasted as they are. Decoding happens in your browser, and nothing you paste is uploaded.

Why a Base64 string won't decode

The most common cause is an incomplete string: a copy that missed the end, or a log that cut a long value short. Extra characters cause trouble too, such as surrounding quotes, a trailing comma from JSON, or escaped slashes written as \/. URL-safe Base64, which uses - and _ instead of + and /, needs converting to standard Base64 first.

If the data is not an image at all, for example a Base64 encoded PDF, there is nothing to preview. In all of these cases the tool says the string doesn't decode to an image rather than offering a broken download.

Where Base64 images turn up

Developers meet them in API responses, database fields, HTML and CSS source, canvas exports and test fixtures. The raw source of an email shows attachments and inline images as long Base64 blocks. Once the preview appears, the panel lists the type, the pixel dimensions and the decoded file size, and Download image saves it with the matching extension.

Supported formats

Base64Data URI

Files up to 25 MB. Large, high-resolution photos are supported.

Privacy

This tool runs entirely in your browser. Your image is never uploaded. No account needed. How we handle files.

Base64 to Image FAQ

Does the string need the data:image prefix?

No. Paste either the bare Base64 or the full data URI.

How do I know what type of image it is?

The Type row shows the format, read from the data URI or detected from the start of the string.

Why is the decoded file smaller than the text I pasted?

Base64 uses 4 characters for every 3 bytes, so the image is about three quarters the length of the text.

Can I convert the decoded image to another format?

Download it, then use one of the convert tools, such as PNG to JPG or WebP to PNG.

Can I try it without my own string?

Yes. Try a sample fills in a small example image so you can see how it works.

Are my images safe?

This tool runs entirely in your browser. Your image is never uploaded.

Is it free?

Yes. No account, no watermark and no limit on how many images you process. Files can be up to 25 MB.

Related tools

See all 8 utilities tools →