Base64 to Image Converter
Paste a base64 string or a data URL and get the picture back, ready to download. Handles missing prefixes, stray line breaks and URL-safe encoding. Nothing is sent anywhere.
Updated May 2026 · Free · Works entirely in your browser
What base64 is for
Base64 rewrites binary data using only 64 characters that survive being pasted into text — the letters, digits, plus and slash. That lets an image travel through channels built for text: inside an HTML file, in a CSS stylesheet, in a JSON API response, in an email body, in a YAML config.
The cost is size. Every three bytes of the original become four characters, so a base64 string is about 33% larger than the file it encodes. That is fine for a 2 KB icon and a genuine problem for a 2 MB photograph.
Reading a data URL
A full data URL looks like data:image/png;base64,iVBORw0KGgo… and has three parts: the media type, the encoding, and the payload. Together they tell the browser everything it needs to render the image without fetching anything.
If your string has no prefix, the format can still be worked out from how it begins, because each format starts with a recognisable signature:
| Starts with | Format |
|---|---|
iVBORw0KGgo | PNG |
/9j/ | JPEG |
R0lGODlh or R0lGODdh | GIF |
UklGR | WEBP |
Qk0 | BMP |
PHN2Zy or PD94bWw | SVG |
Why a paste sometimes fails
- Line breaks. Editors wrap long strings. Harmless, and stripped automatically here.
- URL-safe base64. Some APIs use hyphen and underscore in place of plus and slash so the string can sit in a URL. Also handled automatically.
- Missing padding. The trailing equals signs are sometimes dropped. They are restored here.
- A truncated copy. The usual real failure — the selection stopped short. Nothing can recover a string that is missing its end; go back and copy it all.
- It is not an image. Base64 encodes any binary. A PDF, a font or a ZIP will decode fine and then fail to display.
When to embed an image as base64, and when not to
Worth it for tiny assets that would otherwise cost a separate network request: an icon in a CSS file, a logo in an email template, a placeholder in a single-file HTML export, a small image inside a JSON payload.
Not worth it for anything large. A base64 image cannot be cached separately from the file it lives in, so every page load carries it again, and it blocks parsing while it is read. As a rough line, under about 4 KB is usually a win; above that, serve a real file.
A note on pasting things you did not create
Base64 blobs often come out of API responses, browser storage and config files, and can carry more than you expect — including metadata in the original image. Decoding here happens entirely in your browser and nothing is transmitted, which is worth knowing before pasting something sensitive into any online tool.
Gear we recommend for this workflow
As an Amazon Associate we earn from qualifying purchases. Affiliate disclosure.

Logitech G413 SE Full-Size Mechanical Gaming Keyboard - Backlit Keyboard with Tactile Mechanical Switches, Anti-Ghosting, Compatible with Windows, macOS - Black Aluminum
Best for comfortable typing while editing
View on Amazon
MX Master 3S Bluetooth Edition Wireless Mouse, No USB Receiver - Ultra-Fast Scrolling, Ergo, 8K DPI, Track on Glass, Quiet Clicks, Works with Apple Mac, Windows PC, Linux, Chrome - Graphite
Best mouse for long editing sessions
View on Amazon
Anker USB C Hub, 7in1 Multi-Port USB Adapter for Laptop/Mac, 4K@60Hz USB C to HDMI Splitter, 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Type C Devices (Charger Not Included)
Best for connecting cards, drives and displays
View on Amazon
How To Get To The Top of Google: The Plain English Guide to SEO (Digital Marketing by Exposure Ninja)
Best for optimizing your site's search visibility
View on AmazonFrequently Asked Questions
Everything you need to know about image conversion.