🫧 SUGI

Advertisement

🖼️

Image to Base64 Converter: Photo to Data URI

Image to Base64: choose a PNG, JPG, GIF, WebP or SVG file and get its data URI, Base64 text, CSS url() or img tag. Runs in your browser. Free, no sign-up.

Advertisement

About this tool

An image to Base64 converter (photo to data URI, picture to Base64 string, inline image maker) turns an image file into a long line of text that you can paste straight into HTML, CSS, JSON or an email template without hosting a separate file.

Choose a PNG, JPG, GIF, WebP or SVG image up to 5 MB and the tool shows a preview, the file type and size, and the full result as a data URI such as data:image/png;base64,iVBORw0KGgo...

You can copy the data URI, only the Base64 part, a ready CSS url() value or a complete img tag with one click. When is a data URI useful?

For small icons, logos and background patterns, because it saves one network request and keeps everything in a single file. Why is the text bigger than my file?

Base64 stores every 3 bytes as 4 characters, so the result is about 33% larger, which is why large photos are a poor fit and may slow your page or exceed limits in some systems.

For example, a 10 KB icon becomes roughly 13 KB of text. Is my picture uploaded? No. The file is read by your own browser and never sent or saved.

To convert ordinary text instead of files, use Base64 Encode & Decode on this site. Check that you have the right to use any image you convert.

How to use

  1. Press Choose file and pick an image (up to 5 MB).
  2. Check the preview, file type and size.
  3. Copy the data URI, Base64 only, CSS url() or img tag and paste it where you need it.

Similar free tools

Made by SUGI and checked against our content guidelines · Last updated 2026-11-13 · How we make content

Advertisement