How to use it
- 1
Choose one JPEG, PNG, WebP, or AVIF file.
- 2
Create a Data URI of the source file and a tiny PNG placeholder.
- 3
Copy the required Data URI or the ready-to-use CSS declaration.
What the tool can do
- Detect the format from the file's byte signature.
- Exact base64 encoding of every source-file byte.
- A PNG placeholder that keeps the aspect ratio, with no side larger than 24 pixels.
Common use cases
- Embedding a small local image in CSS or HTML.
- Preparing a tiny placeholder for an image on a site.
- Identifying the MIME type from the file content.
How it works inside
The source Data URI is built directly from the read bytes and displayed only as text.
The thumbnail is created from the image using Canvas in your browser.
Questions and answers
Why convert an image to a Data URI?
It lets you embed an image directly in HTML or CSS as one text string instead of linking a separate file. This can be useful for small resources. Converting to text does not compress the image and can increase data size.
How does an exact copy differ from a placeholder image?
Exact-copy mode preserves the selected file's bytes as text. Placeholder mode creates a separate small PNG for an initial preview. Choose the mode you need and inspect the result before using it in code.
