Skip to main content
T

Image to Base64

Encode an image as a Base64 data URI — paste it into CSS, HTML, or JSON. Optional CSS <code>url(...)</code> wrapper.

Drag an image here, paste from clipboard (Ctrl+V), or

PNG, JPEG, WebP, GIF, SVG. Paste a screenshot directly — no need to save it first.

Send Image to:
Advertisement

How to use Image to Base64

  1. Pick an image.
  2. Toggle data: prefix and CSS wrapper as needed.
  3. Copy the result.

What is Image to Base64?

Base64-encoded images embed directly in HTML or CSS, avoiding an extra HTTP request. Useful for small icons, backgrounds in CSS files, or embedding in code where external assets aren't allowed. Note: encoding adds ~33% size — use only for small images.

Advertisement

FAQ

When should I use Base64 for images?
For small images (under ~5KB) that you'd otherwise load via HTTP. For larger images, a regular image file is faster overall.
Does Base64 encoding increase file size?
Yes, Base64 encoding typically increases the data size by about 33%, so consider the impact on load times.
Is the encoding process private?
Absolutely, your image is processed entirely in your browser; no data is sent to external servers.

Related tools

Advertisement