Image to Base64 Converter
Encode small images into data URIs, raw Base64 strings, HTML img tags, CSS backgrounds and JSON-safe values. Decode Base64 images locally when you need a quick preview or download.
Choose or drag an image
PNG, JPG, JPEG, GIF, WebP and SVG work best. Processing stays in this browser.
Preview
No image selected
- Type
- -
- Size
- -
- Base64 length
- -
Output options
Developer snippets
Copy ready-to-paste data URIs, HTML, CSS and JSON-safe strings for test fixtures, docs and small embedded assets.
Reverse decoding
Paste raw Base64 or a data URI, preview safe image MIME types and download the decoded image from a local Blob.
Private local processing
The browser does the work. Convertr does not receive image files, Base64 strings, filenames or decoded previews.
Frequently Asked Questions
Are my images uploaded when I convert them to Base64?
No. The converter uses FileReader, Blob, and object URLs in your browser. Image files and Base64 strings are not uploaded to Convertr servers.
Can I decode Base64 back to an image?
Yes. Paste a raw Base64 string or a data URI, choose the MIME type if needed, preview the decoded image, and download it locally.
Should I use Base64 for large images?
Usually no. Base64 makes files larger and can slow pages down. It is best for small icons, placeholders, test fixtures, and quick developer snippets.
Image to Base64 Converter
Encode a local image as Base64 or a data URL and decode supported image data back to a file.
- Input
- A local image or Base64 image text plus conversion direction.
- Output
- Base64 text, a data URL, or a decoded image download.
- Real limitations
- Base64 increases size by roughly one third, browser memory is finite, and decoding accepts image data only rather than arbitrary files.
- Privacy and data handling
- a local image or Base64 image text plus conversion direction is processed in this browser tab. Convertr does not receive or store it; closing or reloading the page clears the working state unless the tool explicitly offers a local download.
How to use this tool
- Provide a local image or Base64 image text plus conversion direction in the tool controls.
- Choose the settings that affect Base64 text, a data URL, or a decoded image download, then run the tool.
- Review Base64 text, a data URL, or a decoded image download before copying or downloading it.
Common failure modes
Invalid Base64, a non-image MIME type, a truncated data URL, or a large file that exceeds device memory causes an error.
Useful example
Encode icon.png as a data:image/png;base64 URL for a small embedded documentation example.