Base64 Image Encoder / Decoder

Turn an image into a Base64 data URI and back, entirely in your browser.

Runs entirely in your browser. Nothing you type is uploaded.

About this tool

Choose an image to get its Base64 text and a ready-to-paste data URI, with the original and encoded sizes and the size increase. Paste Base64 or a data URI the other way to preview and download the image. The file is read locally with FileReader and never uploaded.

Questions & answers

Is my image uploaded anywhere?
No. The file is read in your browser with FileReader and encoded locally. Nothing is sent over the network.
Why is the Base64 bigger than the file?
Base64 encodes three bytes as four characters, so it is about 33% larger, plus the data URI prefix. That is the cost of embedding binary data in text.
Why is an SVG shown inside an image element?
SVG markup can carry script. Rendering it only as an image source keeps it inert; inserting it into the page as markup would let it run with this site's origin.

Related tools

Back to all Mini Tools