Images · Made a little simpler

Image to Base64

Encode an image as Base64 or a data URL in your browser. Preview the source, copy the text or download it while preserving every original file byte.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

Image to Base64: how to use it

  1. Choose an image file up to 12 MiB.
  2. Choose Image data URL for an image source field or Raw Base64 for a field that expects only encoded bytes.
  3. Select Encode image, check the preview and copy the output or download the text.

Limits and notes

One nonempty image up to 12 MiB. Supports JPEG, PNG, GIF, WebP, BMP, AVIF, ICO and SVG when the browser can preview the file. Each data URL header is limited to 256 characters on decode.

How your privacy works →

Image to Base64: common questions

Will encoding an image change its quality?

Base64 represents the original file bytes. Pixel values, compression, animation frames and metadata remain part of those bytes.

Which output should I copy for an HTML image source?

Choose Image data URL. It includes the media type, the Base64 marker and the encoded data. The website where you use it must permit data URLs for images.

Guides