Skip to content
AZ Tools

Data URI Parser & Decoder

Decode a data: URI to see its MIME type, encoding, size and decoded contents, in your browser.

MIME typetext/plain
EncodingBase64
Charsetutf-8
Decoded size13 bytes
Decoded text

How to use

  1. Paste a full data: URI into the input box.
  2. Read the MIME type, encoding, charset and byte size.
  3. Copy the decoded text, or preview the image.

About this tool

Show

Paste a data: URI and break it apart: the MIME type, whether the payload is Base64 or percent-encoded, the charset if one was declared, and the real size of the decoded bytes rather than the length of the string. That size is usually the reason you came — Base64 carries three bytes in four characters, so an inlined asset is about a third larger than the file it came from, which is what decides whether inlining is actually saving a request. Textual payloads such as text, JSON, XML, SVG, HTML and CSV are decoded and shown, and an image type gets a live preview. A URI with no MIME type at all falls back to text/plain, exactly as the specification says. Everything runs locally — nothing is uploaded.

Frequently asked questions

Which data URIs are supported?

Any RFC 2397 data: URI, with or without a media type, and either Base64 (;base64) or percent-encoded payloads. A missing media type defaults to text/plain.

How is the size calculated?

It is the real size of the decoded bytes, not the length of the encoded string — so it reflects the actual file or text size the URI represents.

Can it preview images?

Yes. When the MIME type is image/*, the decoded data is rendered as a live preview directly from the URI. Non-image binary payloads just show their size.

Is my data URI sent anywhere?

No. Decoding happens entirely in your browser; nothing is uploaded.

Is inlining an image as a data URI worth it?

For a small icon, often yes — one fewer request. Past a few kilobytes it stops paying: Base64 adds about a third to the byte count, the payload cannot be cached separately from the page that carries it, and it blocks nothing from being re-downloaded on every visit.

Why does a data URI with no MIME type still decode?

Because the specification supplies a default. A URI written as data:,Hello means text/plain with a US-ASCII charset, so the type is optional rather than missing. That default is also why a payload of unknown type is safer to declare explicitly than to leave off.

Related tools