🍋
Menu
🍋 Developer Tools

Data URI Converter

Encode text to Data URIs or decode Data URIs to text

Free Browser-only No sign-up
chars words sentences lines

Data URI Options

Results

Result

About Data URI Converter

Convert text content to Base64-encoded Data URIs or decode existing Data URIs back to readable text. Supports multiple MIME types including text, HTML, CSS, JavaScript, JSON, and SVG.

How It Works

For encoding: paste your content, select the MIME type, and get a complete data: URI. For decoding: paste a data: URI and extract the original content with MIME type information.

Step by Step

  1. 1 Choose Encode (text→URI) or Decode (URI→text)
  2. 2 For encoding: paste content and select MIME type
  3. 3 For decoding: paste the full data: URI
  4. 4 Copy the result

Tips

  • Data URIs are useful for embedding small files directly in HTML/CSS
  • Keep Data URIs small — large ones hurt page performance
  • SVG Data URIs can be used in CSS background-image
  • Most browsers support Data URIs up to 2MB

Frequently Asked Questions

What MIME types are supported?
text/plain, text/html, text/css, application/javascript, application/json, and image/svg+xml.
Can I encode binary files like images?
This tool handles text-based content. For binary image encoding, use a dedicated image-to-Base64 tool.