Advertisement

Image Base64 converter

Convert an image to a Base64 data URL for embedding in HTML or CSS, or paste Base64 to decode it back into a downloadable image.

Image to Base64

Pick an image file to encode.

Base64 to image

Paste a Base64 string or data URL to preview and download it.

Decoded preview appears here.

Advertisement

Why encode images as Base64

Base64 turns binary image data into plain text, which lets you embed small images directly inside HTML, CSS, or JSON without separate files. That removes extra HTTP requests, which is handy for icons, email templates, and single-file pages.

The trade-off is size: Base64 text is about 33% larger than the original file, so it suits small images, not full photo galleries.

Decoding back to a file

Paste any Base64 string, with or without the data URL prefix, and the tool rebuilds the image for preview and download. The file type is detected from the data URL header automatically.

Everything runs locally, so even sensitive images never leave your browser.

Base64 Image Tool FAQs

What is a Base64 data URL?
It is a text string like data:image/png;base64,... that contains the full image data. Browsers render it anywhere a normal image URL works, such as img src or CSS background.
Why is the Base64 string bigger than my image?
Base64 encoding expands binary data by roughly one third. A 90 KB PNG becomes about 120 KB of text, which is why it is best for small images.
Which image formats are supported?
Any format your browser can read: PNG, JPEG, GIF, WebP, SVG, and more. The MIME type is preserved in the data URL.
Can I decode a Base64 string without the data: prefix?
Yes. Paste the raw Base64 and the tool assumes PNG. For other formats, include the full data URL so the correct type is detected.
Are my images uploaded anywhere?
No. Encoding and decoding happen entirely in your browser with the FileReader API. Nothing is sent to a server.
Advertisement