Image to Base64

Read a local image as a base64 data URL for copying into prototypes or small documents.

Files are processed in this browser. Up to 25 MiB per file and 100 MiB combined; supported images may decode to at most 24 million pixels. See the tool-specific instructions for further limits.

Represent an image as a data URL

This tool reads the selected file and represents its bytes as Base64 with a MIME prefix, such as data:image/png;base64,. It does not resize or recompress the source.

Get the encoded value

  1. Choose an image your browser can decode.
  2. Press Process.
  3. Select and copy the output. Retain the MIME prefix when the destination expects a complete data URL.

Example: a small icon

A PNG result begins data:image/png;base64,. Use the entire string for an HTML image's src. Use only the bytes after the comma when an API explicitly requests raw Base64.

Why is the text longer than the file?

Base64 represents three bytes with four characters, plus padding when needed and the prefix. It is text encoding, not compression. Large embedded images make HTML/JSON harder to inspect and prevent independent image caching.

Does this hide metadata?

No. It encodes original bytes, including existing metadata. To create a pixel-only copy first, use Remove Image Metadata.

Limits are 25 MiB and 24 million decoded pixels. The result stays in the page; copy it before navigating away. Base64 to Image reverses supported image data URLs locally.