Skip to content

Image to Base64

Encode an image to a Base64 data URI (or decode one back) with ready-to-paste CSS, HTML and Markdown — all on your device.

PNG, JPG, SVG, WebP, GIF… encoded on your device, nothing is uploaded

Runs in your browser. Files are never uploaded — you can go offline after the page loads.

How to use the Image to Base64

  1. Drop an image to encode — or switch to decode and paste Base64.
  2. Copy the data URI as raw Base64, CSS, HTML or Markdown.
  3. Or decode a data URI back into a downloadable image.

Easy to use

Drop files, pick options, download. Whole folders at once, no signup, no daily limit.

Best quality

The same engines the professionals use — SVGO, resvg, MozJPEG, libwebp, libavif — compiled to run in your browser.

Private & secure

Files are processed on your device and never uploaded. Close the tab and nothing remains anywhere.

Inline an image, or read one back

Encoding a small image as a Base64 data URI lets you drop it straight into CSS, an HTML <img>, or Markdown with no separate file and no extra HTTP request. It is perfect for icons, tiny logos and email signatures — though Base64 adds about a third to the size, so photos are better left as normal files. The tool shows the encoded size so the trade-off is clear.

The reverse direction takes a data URI or a bare Base64 string and turns it back into a real image you can download. Everything happens in your browser with the FileReader API, so even a private screenshot is never uploaded. For embedding SVGs in stylesheets specifically, SVG to CSS is purpose-built.

Frequently asked questions

When should I inline an image as Base64?

For small, frequently used assets — icons, tiny logos, email signatures — inlining removes an HTTP request and keeps everything in one file. Base64 adds roughly 33% to the size, so it is the wrong choice for photos or large graphics.

Is my image uploaded?

No. The file is read with the browser’s FileReader and encoded locally, so even a private screenshot never leaves your device.

Can I convert Base64 back to a file?

Yes — switch to “Base64 → Image”, paste a data URI or a bare Base64 string, preview it, and download the decoded image.

Your files never leave your device

Most online converters upload your file to a server. InfyTool ships the actual encoders to your browser as WebAssembly instead, so processing happens inside your tab — faster for batches, and nothing to delete afterwards.

  • No upload, ever. Turn off Wi-Fi after the page loads and every tool keeps working.
  • No limits. No file-size cap, no queue, no watermark, no account.
  • Runs on your CPU. Batches use several cores in parallel; nothing is throttled.

More free tools

Need graphics to work with?

InfyTool is built by the same team as these free libraries.