go-supertools
Image Tools

Image to Base64

Convert an image to a Base64 data URI that you can copy.

Runs in your browser Your input never leaves your device.

Drop an image here, or .

About this tool

Encode an image as a Base64 data URI that you can paste into HTML, CSS, JSON or an email template. Choose a file and the text appears in a box with a Copy button. The file's own bytes are encoded as they are, so the string starts with the file's real type (for example data:image/jpeg;base64, for a JPG or data:image/svg+xml;base64, for an SVG) and the image is not re-encoded or changed. Base64 text is about a third larger than the binary, so this is best for small images such as icons and logos. Everything runs in your browser; the file is not uploaded.

How to use it

  1. Drop an image or choose a file.
  2. Wait for the Base64 text to appear.
  3. Press Copy.
  4. Paste it where you need the data URI.

Common problems

The string is huge
Base64 text is about 33% larger than the file. Resize or compress the image first, or embed only small graphics.
Original JPEG or WebP is not preserved
The original file is encoded unchanged, so metadata is kept and the size is the file size plus about 33%. To shrink it, compress or resize the image first.
Copy does nothing
Clipboard access can be blocked by the browser. Select the text in the box and copy it manually.