Image ↔ Base64

Convert an image to a data URL or paste a data URL to recover the image.

Tool Media & Files Updated Apr 19, 2026
How to Use
  1. Drop an image to get its data URL.
  2. Or paste a data URL to preview + download.
Encode
🖼️
Drop image
Decode
Preview + output

Notes

Format
data:mime;base64,…
Overhead
+33%
HTML
<img src="data:…">
CSS
url(data:…)
SVG
URL-encoded preferable
Size cap
≤20 KB sweet spot

Frequently Asked Questions

CSS?

Paste the result right after `url(` in CSS background rules.

Performance?

Inlining large images bloats HTML/CSS — keep under ~20 KB.

Common Use Cases

Inline icons

Single-request pages.

Email

Embed without attachments.

Last updated: