Decode Base64 to an Image
Paste a Base64 string or a full data URI and see the image it contains, then save it as a normal file with the correct extension.
- On-device
- No sign-up
- Free, no watermark
DEV/BASE64-TO-IMAGE
Processed on this device
How it works
- 01Paste a raw Base64 string or a data URI into the input.
- 02Check the preview and the detected format.
- 03Download the image as a file.
Why use this tool
Format from the bytes
The decoder checks the actual file signature, so a string labeled image/png that really holds a JPG is saved as a JPG.
Accepts both inputs
Paste raw Base64 or a complete data URI with its prefix. There is no need to trim the data: part by hand.
Safe SVG previews
Decoded SVGs are displayed as images, so any scripts inside them never run in the page.
Supported formats
Use cases
Inspecting an API response
A JSON response contains a long Base64 thumbnail field. Paste it in to see the picture and confirm the endpoint returns the right image.
Recovering an inlined asset
Pull an icon back out of an old stylesheet or HTML email where it was embedded as a data URI, and save it as a reusable file.
Debugging a broken image
An image stored in a database won’t display. Decode the string to see whether the data is valid and which format it really is.
Technical details
The decoder strips an optional data URI prefix, decodes the text to bytes, then reads the first bytes to identify the format. It recognizes JPG, PNG, WebP, GIF, SVG, AVIF, BMP and ICO, and the download uses the matching extension. Detecting from the bytes matters because prefixes are often wrong, for example when code hard-codes image/png for every upload. If the string is truncated or contains stray characters, the image won’t decode, which usually points to a copy error or a field that was cut short in a database.
Decoding happens entirely in your browser, so private images embedded in API responses, logs or database exports aren’t sent to a third-party server just to look at them. That makes it reasonable to paste production data while debugging. This page decodes one string at a time, which keeps the preview and the detected format easy to read. To go the other way and turn files into text, use Image to Base64.
Your files stay with you
This tool runs entirely inside your browser using Web Workers and WebAssembly. Your images are never uploaded, never stored on a server and never used to train AI. Close the tab and they’re gone. Learn more
Frequently asked questions
How do I convert a Base64 string back to an image?
Paste the string into the input, with or without the data:image prefix. The tool decodes it, detects the real format from the bytes, shows a preview and lets you download the image as a regular file with the correct extension.
Why won’t my Base64 string decode?
The most common causes are a string that was cut off, extra characters such as quotes or escaped slashes copied from JSON, or line breaks inserted by an email client. Make sure you copied the full value between the quotes. A string that decodes but isn’t a known image format will not preview.
Is it safe to preview a Base64 SVG?
Yes. SVG files can contain scripts, but Pixellin renders decoded SVGs as images, the same way an img tag does, and browsers don’t run scripts in that mode. You can look at an SVG from an unknown source without it executing code.
What format will the downloaded file be?
The format stored in the data itself. The tool reads the file signature rather than trusting the MIME type in the prefix, so the download gets the right extension, such as .jpg, .png, .webp or .svg, even when the data URI was labeled incorrectly.
Related tools
Image to Base64
Turn an image into Base64 text you can paste into JSON, HTML, CSS or an API request, with the size cost…
DEVData URI Generator
Get a ready-to-paste code snippet that embeds an image directly in your CSS, HTML or Markdown, with no…
WEBFavicon Generator
Upload one logo or icon and get every file a modern website needs for browser tabs, bookmarks and home…
WEBICO Generator
Make a custom .ico file containing exactly the icon sizes you need, for Windows apps, shortcuts and…