Base64 Image Encoder & Decoder

Convert images to Base64 data URIs and back. Everything stays in your browser.

Upload Image

Drag & drop an image here

or browse files

PNG, JPEG, WebP, GIF, SVG, ICO

Paste Base64 String

Frequently Asked Questions

What is Base64 encoding?

Base64 converts binary data (like images) into a text string using 64 printable ASCII characters. This lets you embed images directly in HTML, CSS, or JSON without separate files. The encoded string is about 33% larger than the original file.

When should I use Base64 images?

Base64 is best for small images (under 10KB) like icons, logos, and simple graphics. It reduces HTTP requests, which can speed up page loads. For larger images, serving them as regular files is almost always better — Base64 bloats the HTML and prevents browser caching.

Is my image data secure?

Yes. This tool runs entirely in your browser using JavaScript. Your images are never uploaded to any server. The encoding and decoding happen locally on your device. Close the tab and it's gone.

What's the difference between a Data URI and raw Base64?

A Data URI includes the MIME type prefix (like data:image/png;base64,) followed by the Base64 string. Raw Base64 is just the encoded characters. You need the Data URI format to use it in HTML img tags or CSS backgrounds. Raw Base64 is useful for APIs and data storage.