Skip to main content
Back to Tools
Web Tools

Data URI Converter

Convert text content to RFC 2397 data URIs with Base64 or percent encoding. Decode existing data URIs back to readable content. Supports 17 MIME types. Runs entirely in your browser — your data never leaves your machine.

data-uri base64 encode decode mime rfc2397 converter

Published June 1, 2026

All interactive tools run entirely in your browser. Your data never leaves your device.

How It Works

In Encode mode, paste text content, select a MIME type and encoding (Base64 or percent-encoded), and get a ready-to-use data URI. In Decode mode, paste an existing data URI to extract its MIME type, encoding, parameters, and decoded content.

Features

  • Encode mode: convert text to data URI with Base64 or percent encoding
  • Decode mode: parse data URIs back to readable content
  • 17 MIME types: text, HTML, CSS, JS, JSON, XML, SVG, CSV, Markdown, YAML, TOML, images, PDF
  • Size stats: original size, encoded size, and compression ratio
  • Unicode support: handles multi-byte characters and emoji
  • Copy to clipboard: one-click copy of data URI or decoded content
  • Roundtrip: encode then decode to verify correctness
  • 5 examples: plain text, HTML, SVG, JSON, CSS
  • Private: runs entirely in the browser — no data transmitted

Use Cases

  • Embedding small images or SVGs directly in HTML/CSS
  • Creating self-contained HTML pages with inline resources
  • Testing data URI handling in web applications
  • Encoding configuration data for URL parameters
  • Inspecting and debugging existing data URIs