Image to Base64

Convert an image to a Base64 data URI and back again, with one-click copy.

Image โ†’ Base64

Drag & drop an image here, or click to browse

No uploads. Your files stay on your device.

Base64 โ†’ Image

No uploads. Your files stay on your device.

Free forever, no sign-up, no cookies. Buy me a coffee

How it works

Your image is read with the browser's FileReader API, which turns the file's exact bytes into a Base64 data: URI โ€” no re-encoding, no quality loss, and nothing ever leaves your device. Base64 text is about 33% larger than the original file, so inlining images as data URIs makes the most sense for small assets like icons, logos and tiny decorative graphics that you want to embed directly in HTML, CSS or JSON without an extra network request. The reverse direction decodes any data URI or raw Base64 string back into a real image you can preview and download, detecting the format (PNG, JPEG, GIF or WebP) from the decoded bytes when no prefix is present.

Report a bug