How to use
- Drag an image into the box or select one.
- Choose the output: data URL, raw Base64, CSS, HTML or Markdown.
- Copy the code. To decode, paste a Base64 string below.
When are Base64 images useful?
A data URL embeds an image directly in HTML, CSS, JSON or email – no separate file needed. This is mainly worthwhile for small icons and graphics.
Base64 makes files about 33% larger and can't be cached separately by the browser, so regular image files are usually better for large photos.
Frequently asked questions
Is my image uploaded?
No. The conversion runs entirely in your browser.
Why is the Base64 code larger than the image?
Base64 represents 3 bytes with 4 characters, so the data grows by about a third.
Can I decode Base64 without the “data:” prefix?
Yes. The tool detects PNG, JPG, GIF, WebP, SVG, BMP and ICO automatically from the content.