Image to Base64 Converter
Encode an image as a Base64 data URL, or decode Base64 back into an image file.
Tip: shrink before you encode
- Compress or resize the image first; every saved kilobyte is a third bigger once Base64-encoded.
- SVG icons can often be embedded as plain text instead of Base64, which is smaller.
Frequently asked questions
How do I convert an image to Base64?
Drop an image. You get a data URL you can paste into HTML (<img src="…">), CSS (url(…)) or JSON, plus the raw Base64 text.
How do I turn Base64 back into an image?
Paste a data URL or raw Base64 into the "Base64 to image" box. If it is a valid image, a preview and a Download button appear.
When should I embed images as Base64?
For small icons and images in emails or single-file pages. Base64 is about 33% larger than the original file, so link to normal image files for anything big.
Is my image uploaded?
No. Encoding and decoding happen in your browser.
Related free tools
Base64 text encoder · Image compressor · SVG to PNG · Favicon generator