Base64 to Image

Paste a Base64 string or data URI to preview and download the image — JPG, PNG or WebP, instantly in your browser.

Decoded image preview Your image will appear here

How to use

  1. Paste your Base64 string or data URI into the box.
  2. The image preview and detected format appear instantly.
  3. Click Download to save the image with the correct extension.

What is a Base64 to image converter?

A Base64 to image converter does the reverse of encoding: it takes a Base64 string — the long block of text used to embed an image in HTML, CSS or JSON — and turns it back into a real, viewable image you can preview and download. Paste either a raw Base64 string or a full data: URI, and this tool decodes it in your browser, shows a live preview, and lets you save the result as a JPG, PNG or WebP file. Nothing is uploaded, so even private images stay on your device.

What you can paste

The converter accepts two common forms. The first is a complete data URI, such as data:image/png;base64,iVBORw0KGgo…, which already states the image type. The second is the raw Base64 payload on its own, without the data: prefix. In both cases the tool works out the image format automatically by inspecting the decoded bytes, so you do not have to tell it whether the data is a PNG, JPEG or WebP — it detects the type from the file's signature.

How decoding works

Base64 encodes binary data as text by representing every three bytes as four characters. Decoding reverses that: the tool converts the Base64 text back into the original bytes, then reads the first few bytes — the magic number — to identify the format. A PNG begins with a recognisable ‰PNG signature, a JPEG starts with the bytes FF D8 FF, and a WebP file begins with RIFF followed by WEBP. Once the format is known, the bytes are wrapped in a Blob and shown as an image and offered for download. Because Base64 stores the exact original bytes, the decoded image is pixel-for-pixel identical to the one that was encoded — nothing is lost or altered.

Supported formats

This tool decodes and downloads the three most common web image formats: JPG/JPEG, PNG and WebP, including PNG and WebP transparency. The format is detected from the data itself rather than from any label, so even a raw Base64 string with no data: header is identified correctly and saved with the right file extension. If the text you paste is not valid Base64, or does not decode to a supported image, the tool tells you clearly instead of producing a broken file.

Common use cases

  • Extracting embedded images. Pull a real image file out of a data URI you found in CSS, HTML, an SVG, or a JSON API response.
  • Debugging. Quickly see what a Base64 blob in your code or logs actually contains.
  • Saving inline images. Turn an inlined data-URI image back into a file you can edit or reuse.
  • API work. Decode image data returned by an API that delivers pictures as Base64.
  • Email and exports. Recover images embedded in self-contained documents.

Privacy and safe decoding

Because this converter runs entirely in your browser, the Base64 you paste — and the image it decodes to — never travel to a server. That matters when the data came from a private API response, an internal document or a screenshot, since you can decode and inspect it without exposing it to anyone. The tool also decodes safely: it only accepts the three raster formats JPG, PNG and WebP, which are plain pixel data and cannot contain executable code. It does not render SVG or other markup-based formats, which can carry scripts, so there is no risk of a pasted string running anything. If the data does not match a supported image signature, the tool simply reports an error rather than trying to display unknown content. The result is a fast, private and safe way to turn encoded text back into a usable image file.

How to use this tool

Paste your Base64 string or data URI into the box. The image preview appears immediately, along with the detected format and size, and a download button saves it with the correct extension. If you only have a raw Base64 string, just paste it as-is — the tool adds the right header for you. Everything is decoded locally in your browser, so it is fast, works on any device, and keeps your images completely private. Need to go the other way and turn an image into Base64? Use our companion Image to Base64 tool.

Frequently asked questions

It decodes a Base64 string or data URI back into a viewable image that you can preview and download as JPG, PNG or WebP.

Yes, completely free with no sign-up.

No. Decoding happens entirely in your browser, so your Base64 data and the resulting image never leave your device.

No. You can paste a full data URI or just the raw Base64 — the tool detects the image type either way.

JPG/JPEG, PNG and WebP, including transparency for PNG and WebP.

It inspects the decoded bytes (the file signature or "magic number") to identify whether the data is PNG, JPEG or WebP.

The text is not valid Base64 (it may contain stray characters or be truncated) or it does not decode to a supported image.

No. Base64 stores the exact original bytes, so the decoded image is identical to the one that was encoded.

Yes. Paste the whole data:image/...;base64,... value and the image will be decoded and previewed.

No hard limit — even large Base64 strings decode instantly in your browser.