Image to Data URI Converter
Choose a file and copy the URI.
About this tool
The URI includes the file’s media type and Base64 bytes.
Large files make a long string. The page does not host the image.
How to use it
- Open this page and provide the input it asks for.
- Set the options that are visible, then use Make data URI.
- Read the result in the panel. Copy it or download it when a file is offered. The input stays in this browser.
Limitations
- Large files make a long string. The page does not host the image.
The same bytes, written as base64 text
How the string is built
The page reads every byte of the file and base64-encodes them. The text starts with data:, then the MIME type, then ;base64, then the encoded payload. The MIME is the type the browser reported for the file. When that type is empty, the prefix uses application/octet-stream. The pixels are not decoded and not encoded again. A JPEG stays the same JPEG bytes inside the alphabet. A PNG stays the same PNG bytes. There is no then quality slider, because there is no canvas and no encoder argument. GIF frames, animation delays, SVG markup, and ICC profiles that were in the file remain in the file, hidden inside the text, for as long as the base64 is intact.
What the size costs
Base64 uses four characters for every three bytes, so the payload is about one third larger than the file, and the data: prefix adds a little more. A 900 kilobyte photo becomes roughly 1.2 million characters before you paste it into a stylesheet or an HTML attribute. That text is what the browser will download as part of the document if you inline it. It does not share a cache entry with the image file. It does not get smaller because you chose a “quality.” If the picture is large, a normal image URL is the smaller page. A data URI is useful for a tiny icon or a self-contained demo, and expensive for a hero photograph. Line breaks are not inserted. The result is one long line, which some editors struggle to open.
What you can do with it
The result MIME of the tool is plain text. Copy it into a src attribute or a CSS url() when you truly need the image embedded. Do not run it through a text transformer that wraps lines or trims, or the payload will stop decoding. The original file is untouched. Converting the text back is a base64 decode of the payload, not an image operation, and it should yield the same bytes you started with. If you needed a smaller picture, resize or compress the image first, then build the data URI from that smaller file. Building the URI first and then trying to “compress the text” does not recompress the JPEG inside.
Privacy
Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.

