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.
โ ๏ธ The Base64 output is larger than 1 MB. Pasting a string this big can freeze some editors โ consider compressing or resizing the image first.
Base64 โ Image
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.