DATA URI GENERATOR

Drop a file, get its data: URI with a copy button and a live image preview. Read locally — nothing is uploaded.

Drop a file here, or

Images, fonts, or any other file

Files are read locally with the browser's FileReader API — nothing is uploaded anywhere.

How to generate a data URI

  1. 1

    Drag a file onto the drop zone, or click to choose one from your device.

  2. 2

    For images, a live preview renders straight from the generated data URI.

  3. 3

    Check the file size and MIME type shown above the output.

  4. 4

    Click Copy to copy the full data: URI to your clipboard.

Questions

What is a data URI?
A data URI embeds a file's contents directly inside a URL string, using the format data:<mime-type>;base64,<encoded-data>. It lets you inline small images, fonts, or icons directly into HTML or CSS (e.g. as a background-image or <img src>) without a separate network request.
Is my file uploaded anywhere?
No. The file is read locally using the browser's built-in FileReader API (readAsDataURL) — it never leaves your device, and this tool has no backend to send it to.
Is there a file size limit?
There's no hard limit set by this tool, but data URIs are inefficient for large files — base64 encoding inflates size by about 33%, and very large data URIs can slow down or break the browser tab or wherever you paste them. This works best for icons, small images, fonts, and similarly compact assets.
Why would I use a data URI instead of a normal file URL?
It avoids an extra HTTP request for small, frequently-used assets (like a favicon or a UI icon), and it's handy for embedding an image directly in a single self-contained HTML file, email template, or CSS rule where hosting a separate file isn't practical.
Does the preview work for non-image files?
The live preview only renders for image files, since that's what a browser can display inline. For fonts, PDFs, or other file types, you still get the full data: URI text and can copy it — you just won't see a visual preview here.