decoder.tools

Data URI Parser

Split a data: URI into its MIME type, encoding and decoded payload.

live · client-sideWeb, API & Tokensfree · no sign-up
RAW INPUT
DECODED

Output appears here as you type — decoded on your device.

Input is processed on your device. Nothing you paste is sent anywhere.

What is the Data URI Parser?

A data URI parser breaks a data: URL into its three parts — MIME type, optional parameters such as charset or ;base64, and the payload — then decodes the payload so you can see what is embedded inline.

A data URI (RFC 2397) embeds a whole resource inside a URL: data:[<mediatype>][;base64],<data>. It is how small icons, inline SVGs, fonts and preview images get inlined into HTML and CSS without a separate request. The trade-off is size — Base64 inflates the payload by a third — and cacheability, since inlined data can't be cached independently.

Data URIs also appear in security work. Phishing pages have used data:text/html payloads to render an entire fake login form from a URL, and malicious SVGs can carry script. Parsing the URI locally lets you read exactly what is inside without rendering it.

This parser reports the declared MIME type, whether the payload is Base64 or percent-encoded, the decoded byte length, and the decoded content itself.

Data URI Parser at a glance

Specification
RFC 2397
Syntax
data:[<mediatype>][;base64],<data>
Default type
text/plain;charset=US-ASCII when omitted
Overhead
+33% when Base64-encoded

How to use the Data URI Parser

  1. 1Paste the full data: URI, starting with the data: scheme.
  2. 2Read the parsed MIME type, encoding flag and decoded payload.
  3. 3Copy the decoded content, or check the byte size before inlining it in production.

When you would reach for it

  • Extracting an inline image or SVG out of HTML or CSS source.
  • Checking what a data: link in a suspicious email or page actually contains.
  • Measuring how much weight an inlined asset adds to a stylesheet.

Data URI Parser — frequently asked questions

Last reviewed · questions or corrections: contact@decoder.tools