Data URI Encoder
The data URI encoder converts SVG, CSS, JavaScript, HTML, JSON or plain text into a data: URI you can embed directly in a stylesheet or a src attribute, removing a network request. It defaults to percent-encoding, which is smaller than Base64 for text and leaves the content readable.
Your result will appear here.
Not sure where to start? Use Load example.
Results update automatically and are calculated on your device. Nothing you type is sent to a server.
Runs in your browser. Processing happens entirely in your browser. Nothing you enter is sent to Delimiter.live.
How to use the Data URI Encoder
- Paste your SVG, CSS or text.
- Pick the content type so the correct MIME type is written into the URI.
- Leave the encoding on percent-encoding unless the content is binary.
- Choose a wrapper if you want the CSS url() or an img tag around it, then copy.
Example
<svg/>
data:image/svg+xml,%3Csvg%2F%3E
Common use cases
- Embedding a small icon in a stylesheet to remove an HTTP request.
- Inlining an SVG background so it cannot flash in after first paint.
- Putting a placeholder image into a template without hosting a file.
- Embedding a tiny JSON or CSS payload directly in a document.
Limitations and things to watch for
- A data URI cannot be cached separately from the document that contains it, so an image used on many pages is usually better served as a file. These are worth it for small, single-use assets.
- Base64 adds roughly a third to the size. For text formats such as SVG, percent-encoding is typically a third smaller and stays readable in the source.
- This takes text input. Encoding a PNG or a font means Base64-encoding the file itself, which needs a file upload rather than a paste.
- Very large data URIs slow parsing and bloat every page that includes them. A few kilobytes is a sensible ceiling.