Base64 Image Encode / Decode

Convert PNG, JPG, GIF, WebP or SVG images to Base64 data URIs, or preview a Base64 string as an image. Files are processed locally in your browser.

About this tool

Turn an image into a Base64 data URI or preview a Base64 string as an image. Supports PNG, JPEG, GIF, WebP, BMP, ICO and SVG, and detects the format from the file signature.

How to use

  1. Click Choose image or drop a file onto the page, or paste Base64 or a data URI.
  2. Check the preview, type and size.
  3. Copy the data URI for use in HTML, CSS or JSON.

Frequently asked questions

Are my images uploaded?

No. Files are read with the browser FileReader API and never leave your device.

Can I paste Base64 without the data: prefix?

Yes. The tool detects the image type from the decoded bytes and builds the full data URI.

When should I inline images as Base64?

For small icons or emails where an extra request is costly. Base64 is about 33% larger than the original file, so keep large images as files.

Related tools