🔒 Files are processed in your browser and never uploaded to a server.

Upload Image
Click to upload or drag & drop image
PNG, JPG, GIF, WebP, SVG
Base64 Output

What is an image to Base64 converter?

An image to Base64 converter writes an image file as a string of text characters. You can then put the image straight into HTML, CSS or JSON as a data URI, with no separate file. You need it for small icons, email templates and test data, and to see the image inside a Base64 string.

How to convert an image to Base64

  1. Select Image → Base64 and upload or drop an image.
  2. Click Copy Base64 for the raw string, or Copy as Data URI for HTML and CSS.
  3. To go back, select Base64 → Image and paste the string.
  4. Click Decode to Image, then Download Image.

When is a data URI a good idea?

Use it for small images, under about 5 to 10 KB: icons, a logo in an email signature, a tiny placeholder. The browser saves one request. For large images it costs more than it saves: Base64 is about 33% larger than the file, and the browser cannot cache the image apart from the page or the stylesheet.

Frequently Asked Questions

What is a data URI and when should I use it?

A data URI puts the image inside HTML or CSS as text, for example data:image/png;base64,.... The browser needs no extra request. Use it for small icons and email images.

Does Base64 make the image larger?

Yes. Base64 writes 3 bytes as 4 characters, so the string is about 33% larger than the file.

Can I decode any Base64 string to an image?

Any valid Base64 image works. The tool reads the format (JPEG, PNG, WebP, GIF) from the data URI prefix.

What is the difference between raw Base64 and a data URI?

Raw Base64 is only the encoded data. A data URI adds data:<type>;base64, in front, so a browser can show it as an image source.

Is my image uploaded to a server?

No. Encoding and decoding run in your browser. Your image stays on your device.