Kodowp: Image Processing Hub
To format
From format
Pairs
Tools

Image to Base64

Turn an image into a Base64 string: Data URI, img tag or CSS code. Handy for web developers. Everything happens in the browser, files are not uploaded anywhere.

Drag images here or click to choose JPG, PNG, WebP, GIF, AVIF, SVG, TIFF, BMP, ICO, TGA, PCX, PPM, PGM, PBM, QOI — you can select several files at once
No files yet

Base64 turns a file into an ordinary string of letters and digits. Such a string can be pasted straight into HTML, CSS, an email or JSON without creating a separate file. This page encodes pictures to Base64 and shows the ready-made code at once.

Four kinds of output are available. Data URI suits the src attribute, the img tag is ready to paste into a page, background-image is for CSS, and the Base64 only mode gives a plain string for APIs and configurations.

Embedding small icons in code saves a server request and simplifies emails and single-page sites. It is not worth doing this for large images: a Base64 string is about a third longer than the original file, and the browser does not cache such a picture separately.

You can load several files at once. For each one you see the size of the source and the length of the code, and the result is copied with one button or saved to a text file. Long strings are shown in abbreviated form but are copied in full.

Encoding happens in the browser: files are not sent to a server and are not saved anywhere. This is safe for personal pictures and private mockups. To get an image back from a string, use the neighboring reverse conversion page.