Skip to content
Convertto

Data URI Generator

Turn text, SVG or CSS into a data: URI you can inline directly in HTML or stylesheets.

To create a data URI, paste your content and pick its MIME type. The result can be inlined directly in an img src, a CSS background or a fetch call, removing one network request. URL-encoding is usually smaller than Base64 for SVG.

Runs in your browser
Privacy
Runs entirely in your browser — nothing is uploaded
Cost
Free, unlimited, no sign-up

Frequently asked questions

Should I use Base64 or URL-encoding for SVG?

URL-encoding is usually 20–30% smaller for SVG because the markup is mostly ASCII already. Base64 inflates any content by roughly a third regardless of what it contains.

How to use the data uri generator

  1. 1Enter or paste your content.
  2. 2Choose the mime type.
  3. 3Choose the encoding.
  4. 4The result appears immediately — copy or download it.

Embed this tool

Put the working data uri generator on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.

Share this tool

Last updated

More encoders & decoders