Skip to content
Tesserae

Keyboard shortcuts

Focus search
/
This help dialog
?
Run the current tool
Ctrl/⌘ +Enter
Copy the output (when an output is focused)
Ctrl/⌘ +C

Shortcuts are ignored while you are typing in an input, a textarea or a select.

Web & CSS

Data URI Converter

Turn text into a self-contained data: URL (base64 or percent-encoded) with your chosen MIME type and charset, decode a data: URI back to text, embed an image file as a data: URI, or unpack a data: URI into a downloadable image. Everything happens in this tab.

On-device No network Offline-ready

🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.

Try:

The text never leaves this tab.

Options

How it works

The four directions of the converter

This tool turns text into a data: URL or back, and does the same for images. The four modes are text to a data: URI, a data: URI back to text, an image file into a data: URI, and a data: URI into a downloadable image file. Image encoding also writes a text file of the result.

When to inline a resource

Reach for it when you want a page or an email to need no separate request: an SVG sprite, a small logo or a font embedded in a single HTML file, or an image placed in a CSS background rule. Decoding unpacks a pasted data: URI into plain text or an image file.

MIME type, encoding and wrapper

Mode sets the direction. For text, mimeType declares the type, charset appends ;charset=utf-8, and encoding picks base64 or percent. For images, wrap chooses a raw URI, a CSS background rule or an HTML img tag, and mediaQueryComment adds an explanatory comment above it.

The 25 MB image ceiling

Image encoding is capped at 25 MB, because base64 runs about a third larger than the source file. Base64 needs no escaping while percent-encoding is shorter for mostly-ASCII text. A malformed payload is an error rather than a guess, and the tool requires exactly one image file.

Where the encoding happens

Encoding and decoding happen entirely in this tab. Nothing is uploaded, no request is made for the URI or its contents, and the page keeps working offline once it has loaded.

Questions

Why base64 instead of percent-encoding?

base64 grows the payload by ~33% but never needs escaping; percent-encoding is shorter for mostly-ASCII text. Both are valid per RFC 2397.

What happened to “Image to Data URI” and “Data URI to Image”?

Both are now modes of this tool. Their old URLs still work and redirect here, so old links and bookmarks keep working.

Does the data: URI leave my device?

No. Encoding and decoding happen in this tab; nothing is uploaded and the URI never leaves your browser.

See category