Home › URL tools › Data URI Builder

Data URI Builder

Turn any text or URL into a base64 data: URI — choose a MIME type and copy the result instantly, privately.

What is a data URI?

A data URI embeds a small file directly inside a web document as a text string, rather than pointing to an external URL. It follows the syntax data:<mime type>;base64,<data> — the MIME type describes the content (like text/plain, image/png or image/svg+xml), and the payload is the content itself, usually base64-encoded. Because everything lives in one string, there is no extra HTTP request to load the resource. This builder takes any text or URL you type, base64-encodes it, and produces a ready-to-paste data URI. Data URLs are supported by every modern browser and are widely used for small inline images, icons, favicons, email signatures and single-file HTML pages. When the file is tiny, the saving from avoiding a network round trip outweighs the slight size overhead that base64 encoding adds.

Example

Type Hello, ToolCubby! with the MIME type text/plain and the tool returns data:text/plain;base64,SGVsbG8sIFRvb2xDdWJieSE=, which any browser decodes straight back into the original text.

Common use cases

Pro tips

How to use

  1. Pick the MIME type for your content.
  2. Enter your text or a URL.
  3. The data URI is generated instantly — copy it.
  4. Paste it into an img src, a href or a CSS background url.

FAQ

What is a data URI?

A data URI embeds small content directly inside a URL using the data: scheme, so the browser shows it without fetching a separate file. It can be a text/plain, image or other MIME type.

When should I use a data URI?

For tiny assets like inline icons, small images or favicons that should load without an extra network request. Avoid it for large files because it is not cached well.

Is it private?

Yes — it runs entirely in your browser and nothing is uploaded to a server.

What MIME types are supported?

This tool includes the common ones: text/plain, text/html, application/json, image/svg+xml, image/png, image/jpeg and others you can pick from the list.

What is base64 encoding?

Base64 turns binary data into a safe ASCII string using the characters A-Z, a-z, 0-9, + and /. It is not encryption, only a way to move binary data through text.

Are data URIs supported in all browsers?

Yes. All major browsers support the data: scheme, so you can use them in img, CSS, links and scripts.

Why is a base64 data URI larger than the original file?

Base64 uses 64 characters to represent 8 bits, so it needs about 4/3 of the original byte count — roughly 33% bigger.

When should I avoid a data URI?

For large images or files. They are not cached separately and add weight to every page load, so a normal file URL is better.

Is a data: URL safe?

It is fine for your own content, but never paste untrusted data into an href that executes, since data: URLs can be used in phishing and XSS attacks.

What can I embed with this builder?

Any text, HTML, JSON, SVG, or image content you can type or paste, using the matching MIME type.

More FAQs

Are these URL tools free?

Yes, free and unlimited with no signup.

Is my data uploaded?

No. Everything runs in your browser and nothing is sent to a server.

Related searches

data uri generator, base64 data uri, data url builder, inline image base64, data uri css, data:image/png, base64 encoder, embed image in html, svg data uri, data url converter

Related tools