Base64 Image Converter

Convert image to Base64, or decode a Base64 data URL back to an image. Drop, paste or upload PNG, JPG, WebP, GIF or SVG. Free, instant, runs locally in your browser.

Drop image here, paste, or click to browse

JPG, PNG, WebP, GIF, SVG

What does this Base64 image converter do?

This is a bidirectional Base64 image converter: it converts an image to Base64 (encode) or decodes a Base64-encoded image string back into a downloadable file (decode). Supported formats for both directions: PNG, JPG, WebP, GIF and SVG. The encoder returns a Base64 data URL that starts with data:image/png;base64, followed by the image bytes as plain text — paste it directly into an HTML <img src="..."> tag, a CSS background-image: url(...) declaration, a CSS variable, or a JSON payload, and the image renders without a separate HTTP request.

Common use cases for Base64-encoded images

Base64 data URLs are roughly 33 % larger than the binary file, so they're best for small images (under ~10 KB). For anything bigger, host the image on your CDN and link to it normally — the tool will warn you when the output is too large to be useful.

How to convert an image to Base64 (step by step)

  1. Make sure Encode mode is selected (default).
  2. Drop your image onto the drop zone, paste from clipboard (Cmd/Ctrl-V), or click to browse.
  3. Pick the output format you want: Data URL, CSS background-image, HTML <img> tag, CSS variable, or JSON string.
  4. Optionally re-encode to JPG q85 or WebP q85 to shrink the Base64 output.
  5. Click Copy — the Base64 string is now on your clipboard.

How to decode a Base64 image back to a file

  1. Switch to Decode mode.
  2. Paste the full Base64 data URL (the string starting with data:image/...;base64,).
  3. The image preview appears immediately.
  4. Click Download image to save the original PNG, JPG, WebP, GIF or SVG file.

Privacy and how it works

Every byte of conversion happens locally in your browser via the FileReader API. Your image never leaves your device, so even private screenshots, internal mockups or sensitive design assets are safe to convert here. Nothing is uploaded, logged or cached server-side.