Skip to content
Categories
Image ↔ Base64 Converter
Convert an image to a Base64 data URL, or restore an image from Base64.
Overview
- Converts an image file into a Base64-encoded data URL, or restores an image from a Base64 string.
- In "Image → Base64" mode, the uploaded image is output as a data URL string.
- In "Base64 → Image" mode, an image is restored from a data URL or a raw Base64 string (without a prefix) and can be downloaded.
Usage
- Select "Image → Base64" or "Base64 → Image" as the mode.
- In "Image → Base64", selecting an image automatically generates its data URL. Use "Copy" to copy the result.
- In "Base64 → Image", paste a Base64 string (or data URL) and click "Decode" to see a preview and download link.
Example
Input
icon.png (Image → Base64 mode)
Output
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...
Use Cases
- Embedding a small icon image directly into a CSS background-image or an HTML img tag
- Embedding an image where external file references aren't possible, such as in email bodies or JSON config files
- Previewing and saving Base64 image data returned from an API response
FAQ
Is the uploaded image or Base64 string sent to a server?
No. All processing happens entirely in your browser (client-side) and nothing is sent to an external server.
Can I decode a string that doesn't have the data URL prefix (data:image/png;base64,)?
Yes. Select the image type in "MIME type" and a raw Base64 string without a prefix can also be decoded.
Does Base64 encoding increase the image file size?
Yes. Base64 encoding increases the size by roughly 33% compared to the original binary data, so it isn't ideal for large images.
Notes
- Uploaded images must be 10MB or smaller.
- Base64 encoding increases file size by roughly 33%, so it isn't well suited to embedding large images.
- Entering an invalid string in "Base64 → Image" mode shows an error message.
Related Tools
Convert images between PNG, JPEG, and WebP, with resizing and compression.
Merge multiple PDFs into one, or extract a specified page range (merge / split).
Optimize a PDF's internal structure and strip metadata to reduce its file size.