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
- Choose an image your browser can decode.
- Press Process.
- 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.





