Skip to main content

Data URI Generator

v1.0.1

Convert any file to a Base64 data URI ready for embedding.

Encodes any file (image, font, SVG, audio) to a Base64 data URI and decodes existing data URIs back to their original file content for embedding assets directly in HTML or CSS.

How to use
  • Drop a file onto the input or paste an existing data URI to start encoding or decoding.
  • Copy the generated data:type/subtype;base64,... string and embed it in an img src attribute, CSS url(), or link href.
  • Toggle between URL-safe and standard Base64 encoding if you need to embed the URI in a query parameter.
  • Check the file size comparison to decide whether inlining the asset is actually smaller than a separate request.