Data URI Inspector & Security Checker

Decode any data URI and flag potentially dangerous MIME types or obfuscated payloads

Ad placeholder (leaderboard)

Data URIs let you inline a whole resource into a single string, which is handy for small assets but is also a favourite trick for smuggling executable content past naive filters. This tool decodes a data URI, shows exactly what it contains, and flags the patterns that make a data URI dangerous.

How it works

The tool parses the URI against the RFC 2397 shape data:[<mediatype>][;base64],<data>:

  1. It splits off the media type and the payload at the first comma, defaulting the type to text/plain;charset=US-ASCII when none is given.
  2. It detects whether the payload is base64 or percent-encoded and decodes it, reporting both the encoded length and the decoded byte size.
  3. Safe raster image types (PNG, JPEG, GIF, WebP) are previewed inline directly from the URI. SVG is deliberately excluded from preview because it can run script.
  4. For textual payloads it inspects the decoded content for <script> tags, inline event handlers, nested data: URIs, and oversized base64 blobs, raising the risk level accordingly.

Example and notes

Paste data:text/html,<h1>hi</h1><script>alert(1)</script> and the tool reports a text/html type, flags it high risk as a navigable executable type, and additionally notes the embedded <script> tag in the decoded payload. Paste a small data:image/png;base64,... and it previews the image inline and reports low risk.

Use this when reviewing CSP policies (data URIs interact with img-src, script-src and frame-src) and when checking that input sanitisation strips or neutralises hostile data URIs. Everything runs locally, so suspicious input never leaves your browser.

Ad placeholder (rectangle)