Image to Base64 Converter
Drag & drop or upload a PNG, JPG, GIF, SVG, WebP or ICO and get a Base64 data URI you can paste straight into HTML, CSS, JSON or Markdown. Everything runs locally in your browser — your image is never uploaded.
Drop an image here
or click to browse — PNG, JPG, GIF, SVG, WebP, ICO
Choose fileYou can also paste an image with Ctrl/⌘ + V
- Name
- —
- Type
- —
- Dimensions
- —
- Base64 size
- —
Heads up: Base64 is ~33% larger than the original file. Great for small icons; for big images a normal <img src> is usually better.
About this image to Base64 converter
PNG, JPG/JPEG, GIF, SVG, WebP, BMP and ICO are all encoded to a data URI with the right MIME type.
Switch between raw Base64, a full data URI, or HTML <img>, CSS background-image, Markdown and JSON.
Drop a file, browse for one, or paste an image straight from your clipboard.
See the image on a transparency checkerboard with its type, dimensions and encoded size.
Copy the snippet with one click or save the Base64 string as a text file.
Encoding happens entirely in your browser — your image is never uploaded anywhere.