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.

AULA F75 Pro Wireless Mechanical Keyboard,75% Hot Swappable Custom Keyboard with Knob,RGB Backlit,Pre-lubed Reaper Switches,Side Printed PBT Keycaps,2.4GHz/USB-C/BT5.0 Mechanical Gaming Keyboards
Best for comfortable typing while editing
$64.99
Check price on Amazon
Logitech MX Master 3S Bluetooth Wireless Mouse No Receiver - Graphite | MagSpeed Scrolling, 8K DPI tracking, Quiet clicks, Programmable buttons, Bluetooth, Windows PC, Mac, Linux, Chrome
Best mouse for long editing sessions
$79.99
Check price on Amazon
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
Best for connecting cards, drives and displays
$24.99
Check price on Amazon
3 Months to No.1: The "No-Nonsense" SEO Playbook for Getting Your Website Found on Google
Best for optimizing your site's search visibility
$13.97
Check price on AmazonPrices as of Oct 26, 2026, 4:45 AM UTC. Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon.com at the time of purchase will apply to the purchase of this product.
Frequently Asked Questions
Everything you need to know about image conversion.