Skip to content
devtoolbox.cc

Image to Base64 Converter

Convert images to Base64 data URIs for CSS, HTML and Markdown, or Base64 back to an image with preview and download. PNG, JPEG, WebP, SVG.

Runs locally in your browser

Guide

About the Image ↔ Base64 converter

Image → Base64: choose, drag in or paste an image. You get a Base64 data URI ready to embed, plus a preview, the file type, the pixel dimensions and the sizes. Copy it as:

  • a data URI (data:image/png;base64,…) or raw Base64
  • a CSS background-image rule
  • an HTML <img> tag
  • a Markdown image

Base64 → Image: paste Base64 or a data URI to see the image, check its real type and size, and download it with the right file extension.

Good to know

  • Base64 makes data about 33% larger. Inline small icons and sprites; link large photos as normal files so browsers can cache them.
  • The type is detected from the file’s own bytes (PNG, JPEG, GIF, WebP, BMP, ICO, AVIF, SVG), not from the name. A data URI that claims the wrong type is flagged.
  • Line breaks, spaces, URL-safe characters (-_) and missing padding in pasted Base64 are handled.

Is my image uploaded?

No. Images are read and encoded entirely in your browser, and they are never stored.