Hash Generator
Produce SHA-1, SHA-256, SHA-384 and SHA-512 digests of any text.
Turn text, SVG or a small file into a data: URI you can inline anywhere.
Or drop a small file here — it is read locally and never uploaded
The Data URI Generator turns pasted text, SVG markup or a dropped file into a data: URI, comparing Base64 against percent-encoding so you can take the smaller, and giving you the CSS and HTML lines to use it.
A data URI embeds a whole file in a single string, so an image, a font or an SVG can live inside a stylesheet or a page instead of costing a request. Paste text or drop a file and you get the URI plus the CSS and HTML lines to use it.
The encoding choice matters more than people expect. Base64 works for anything but adds about a third to the size. Percent-encoding is usually smaller for SVG, because most of an SVG is already URL-safe characters — which is why every guide to inlining SVG in CSS recommends it. The tool shows both sizes so you can pick the smaller one, and warns when the result is large enough that a separate file would have been the better call.
Base64 and percent-encoding are both sized, because for SVG the percent-encoded form is usually noticeably smaller.
A CSS background-image line and an HTML tag come with the URI, already escaped for the context they go in.
A dropped file brings its own type; pasted text gets a picker with the types that actually get inlined.
When the result grows past the point where a separate cacheable file would be better, the tool says so.
A dropped file is read locally with the File API and encoded in the tab.
SVG markup, an icon, a small image or any text.
Detected from a dropped file, or chosen from the list for pasted text.
Base64 or percent-encoding, with both sizes shown so you can take the smaller.
The URI, a CSS background line and an HTML tag are all ready to paste.
For small assets used immediately — an icon, a tiny background, an inline SVG. It trades one request for a larger, uncacheable document, so it stops paying off somewhere around a few kilobytes.
Percent-encoding, almost always. SVG is mostly characters that need no escaping, so it usually comes out smaller than Base64, which inflates everything by a third.
Usually an unescaped hash from a colour, or double quotes clashing with the CSS string. Percent-encode the hash as %23 and use single quotes around the url() value.
No. A dropped file is read by your browser with the File API and encoded locally. Nothing is sent anywhere.
What people who use the Data URI Generator think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the Data URI Generator. It takes half a minute and no account.
Write the first reviewProduce SHA-1, SHA-256, SHA-384 and SHA-512 digests of any text.
Generate serde-ready Rust structs from a sample JSON document.
Convert HTML back into clean Markdown, keeping lists, tables and code.
Generate Python dataclasses with type hints from a sample JSON document.
Re-indent HTML without breaking whitespace-sensitive elements.
Encode and decode Base58 in the Bitcoin, Ripple or Flickr alphabets.
Every HTTP status code, searchable, with what it actually means.
Generate deterministic UUIDs from a namespace and a name.