Image to Base64 Converter

Drop an image to get a Base64 data URL ready to paste into HTML, CSS, Markdown, or inline anywhere you need a self-contained image.

Drop an image here, or click to pick one

PNG · JPEG · WebP · SVG · GIF · BMP · ICO

Frequently asked questions

Is my image uploaded anywhere when I convert it?

No. The file is read and encoded entirely in your browser, so the image and its Base64 data never leave your device — safe even for sensitive or private images.

What is a Base64 data URL and where can I paste it?

A data URL is the image encoded as text (starting with data:image/...) that you can paste directly into HTML <img> tags, CSS background-image rules, or Markdown to embed the image inline with no separate file. This tool gives you Data URL, CSS, HTML, and Markdown variants ready to copy.

Why is the Base64 string larger than my original file?

Base64 encoding adds roughly 33% to the size because it represents binary data using only text characters. The tool warns you when a data URL exceeds 1 MB, since linking to a hosted image is usually better at that point.

Which image formats can I convert?

PNG, JPEG, WebP, SVG, GIF, BMP, and ICO are all supported. The output keeps the original format's MIME type so the embedded image renders correctly.

Related tools