Type a tool name, for example "keyword density" or "transcript".
Paste a Base64 encoded string below to convert it into a downloadable image.
Base64 to image is a free online decoder that turns a Base64 string or data URI into a picture you can preview and save. Paste the text, click Convert to Image, check the detected format, dimensions and file size, then download the file. It suits developers, testers and anyone who finds an image buried in text.
A Base64 image string is a picture written as plain text, using only letters, numbers, plus signs, slashes and equals signs. Base64 is an encoding scheme that represents binary data (the bytes of a PNG or JPEG file) with 64 safe text characters, so the image can travel inside JSON, HTML, CSS, email or a database field.
Every 3 bytes of image data become 4 characters of text, so the encoded version is roughly one third larger than the original file. That overhead is the price of keeping an image inside a text format.
You will meet the same image in two shapes. Raw Base64 is just the encoded characters, such as iVBORw0KGgoAAAANSUhEUgAA.... A data URI wraps those characters with a label that tells a browser what they are, such as data:image/png;base64,iVBORw0KGgo.... The converter accepts either shape, which is why the input hint shows both examples.
The first characters of the encoded text come from the file header, so they reveal the image type. These beginnings are well established:
| Starts with | Format | Typical use |
|---|---|---|
| iVBORw0KGgo | PNG | Logos, screenshots |
| /9j/ | JPEG | Photos |
| R0lGOD | GIF | Simple animations |
| Qk | BMP | Uncompressed bitmaps |
| UklGR | WebP | Web-optimized images |
You can decode a string in under a minute. Follow these steps:
Say a teammate sends you a JSON response containing a field that begins with iVBORw0KGgoAAAANSUhEUgAA and runs for 4,000 characters. You copy only the value, without the surrounding quotes, and paste it into the box.
The text starts with the PNG signature, so the tool reports the format as PNG. The string has 4,000 characters and no padding, so it decodes to about 3,000 bytes (4,000 x 3 / 4), and the File Size field shows roughly 2.9 KB. Dimensions appear next to it, for example 120 x 120 pixels, and the preview shows the actual picture.
What this tells you: the string is a small, valid PNG, probably an icon or a thumbnail. A 3 KB image is a sensible candidate for inlining. If the same field held 400,000 characters, you would see a file near 300 KB, and that is usually a sign the image should be a normal file instead.
The result panel gives you three facts and a preview, and each one points to a next step.
The format label tells you what kind of file you will download. If it says PNG for something that should be a photo, the source may have stored a lossless version, which is a hint to convert it. If the label says Unknown, the text may be damaged, truncated or not an image at all.
Dimensions are the width and height in pixels. Compare them with the space where the image will appear. A 2000 x 2000 image shown in a 100-pixel slot wastes bandwidth, so run it through an image resizer before reuse.
File size is the size of the decoded file, not the length of your text. Expect the pasted text to be about 33% longer than this number. As a widely used rule of thumb, Base64 works well for small assets such as icons and tiny logos, and gets wasteful for large photos. If the decoded file is bigger than you want, try an image compressor before encoding it again.
The preview is your proof that the data is a real image. If the picture looks cut off at the bottom, the string was probably truncated when it was copied. If it looks right, download it and use it like any other file.
In JavaScript, React, HTML, Python, C#, n8n or Power Automate, the idea is the same: either decode the characters back into bytes and save them as a file, or build a data URI and use it where an image address would go. In HTML, you set the image source to the full data URI, including the data:image/png;base64, prefix.
This page is the fast way to check your input before you write that code. If the preview works here, the string is valid and the bug lives in your code, usually a missing prefix, a wrong content type or stray characters. To go the other direction and produce a string from a file, use the Image to Base64 converter.
Most failed conversions come from small input mistakes, and each has a quick fix.
If you copy from JSON or source code, leave out the quotation marks, commas and field names. A leading quote or a trailing semicolon turns valid data into an error.
Text taken from logs or JSON often contains escaped line breaks such as \n or escaped slashes. Replace them with nothing (or a plain slash) before pasting.
Terminals, spreadsheets and some chat apps cut long strings. Compare the character counter with the length you expect. A string that ends abruptly will not give a full image.
Both data:image/png;base64, strings and raw Base64 work. Do not paste half a prefix, and do not paste a prefix twice.
If you are unsure whether the problem is your data or your workflow, click Sample. A working sample proves the page is fine, so the issue is in your string.
If the decoded image is a scan or screenshot and you want the words in it, send it through an image to text OCR tool.
The tool decodes image data. It cannot repair a corrupted string, guess missing characters or turn a PDF, audio clip or other file type into a picture. Format detection reads the start of the data, so an unusual or unlabeled format may show as Unknown. Very long strings take longer to paste and display, and your device's memory is the practical limit, so for huge images a normal file workflow is a better fit. When you need a dummy graphic for a layout test rather than a decode, a placeholder image generator is quicker.
Paste your Base64 text into the box above, click Convert to Image, and you will know in seconds whether the string is a valid picture, what format and size it has, and have the file ready to download.
Your report has been submitted. We will look into this issue.
A VPN changes your network exit. It does not guarantee anonymity.
Themes, plugins, code, video, audio, graphics & more from 90,000+ authors.
Web Development
Design & Media
Unlimited Access
Explore Envato Market