1. Home
  2. Image tools
  3. Base64 to Image

Base64 to Image

APIs, JSON payloads, emails and CSS files often carry images as Base64 text. Paste the string to see the picture, find out what format it really is, and save it as a normal file.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Base64 to Image

  1. Paste a Base64 string or a full data: URL.
  2. Check the preview, the detected format and the dimensions.
  3. Download the original file or save it as PNG, JPG or WebP.

Features

  • Accepts data: URLs and plain Base64
  • Repairs line breaks, URL-safe characters and missing padding
  • Detects the real format from the bytes
  • Warns when the declared MIME type is wrong

Supported formats

Input

  • Base64
  • Data URL

You get

  • PNG
  • JPG
  • WebP
  • GIF
  • SVG

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Base64 to Image is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • The whole string must be pasted: a truncated copy cannot be repaired.
  • Very long strings (tens of megabytes) are slow to paste into a browser text box.

Guide

Decoding Base64 strings and data URLs back into image files

Images travel as text more often than you might think: in JSON responses from APIs, inside HTML emails, embedded in CSS as background images, stored in databases and printed into log files. That text is Base64, a way of writing binary data with 64 safe characters. Paste such a string here to see the picture, find out what format it really is and save it as a normal file.

Data URLs and plain Base64

A data URL looks like data:image/png;base64, followed by a long run of letters, digits, plus signs and slashes. The part before the comma declares the type; the rest is the image. Plain Base64 is just the long run without the header. SVG images are sometimes embedded without Base64 at all, as percent-encoded text such as data:image/svg+xml,%3Csvg…; those are understood too.

Copy mistakes that are fixed for you

Strings copied from code rarely arrive clean. The decoder removes surrounding quotes and CSS url( ) wrappers, strips spaces and line breaks added by email clients or log formatters, decodes URL escapes such as %2B, converts the URL-safe alphabet that uses minus and underscore, and restores missing = padding at the end. A note above the preview lists every repair, so you know exactly what was changed.

Real format detection

The declared type is not trusted. After decoding, the first bytes of the data identify the actual format: PNG, JPEG, GIF, WebP, AVIF, BMP, ICO, TIFF, SVG and others. If a data URL claims image/png but contains a JPEG, a warning tells you to fix the MIME type in your code, since some email clients and libraries rely on the label.

Reading the details

Below the preview you see the format, the pixel dimensions, the decoded size and how many characters the Base64 used, with the overhead in percent. Very small images are shown enlarged with hard pixel edges, so a 16-pixel icon is still visible. Download the original bytes with the correct extension, or convert to PNG, JPG or WebP in one step.

Diagnosing broken strings

When decoding fails, the message says why. An invalid character is named with its position, which usually points to a stray quote, an HTML entity or a character inserted by a text editor. A string whose length leaves one character over at the end has been cut off; this happens with log lines that are truncated at a fixed length. Truncated data cannot be repaired, because the missing part of the image is simply gone; copy the full value from the source instead.

The reverse direction

To embed a file as Base64, use Image to Base64, which produces data URLs, CSS and HTML snippets. For Base64 that contains text rather than an image, the Base64 Encoder decodes and encodes plain strings. Everything happens in your browser, which matters when the data comes from private API responses or customer records.

Security and privacy when decoding

Base64 from an API or a database can contain personal photos, signatures or scanned IDs. Pasting it into an online decoder usually means sending it to someone else’s server; here the string is decoded in your browser and never transmitted. The picture is drawn through the browser’s image decoder, which does not run scripts, so even an SVG with embedded JavaScript is shown as an inert image. If you work with untrusted data regularly, this is a safe way to look inside it without opening files on your desktop.

Checked against the current version of the Base64 to Image on .

Troubleshooting

The download did not start

Look for your browser’s download bar or icon. Some browsers ask once before a site may download files; allow it and click the button again.

Frequently asked questions

What is the difference between a data URL and plain Base64?

A data URL adds a short header, such as data:image/png;base64, in front of the Base64 text, telling the browser the type. Plain Base64 is only the encoded bytes. Both decode to the same file here.

How much larger is Base64 than the image itself?

About a third larger: every three bytes become four characters. That is why large images should be served as files rather than embedded, while small icons are fine inline.

Why does my Base64 string not decode?

Usually because part of it is missing, for example when a log or console cut a long line. The decoder names the first invalid character and tells you when the data ends mid-character, which is the sign of a truncated copy.

Keep working with the result

After you download, choose “Save to Workstand” to keep the result in a folder on your computer, attach it to a project and create a follow-up task. It is saved by your browser, not uploaded.