64
64Encode

Data URI Generator (HTML / CSS / SVG / MIME)

Build valid data:<mime>;base64,... URIs from raw code (SVG, HTML, CSS, JS) or uploaded files with live preview.

Validate Base64 / Data URI on 64Decode
Generated Data URI
Technical Guide

Generate RFC 2397 Base64 Data URIs for SVG, HTML, CSS & JS

Data URIs allow you to embed inline SVG icons, HTML snippets, CSS stylesheets, or JSON payloads directly inside URLs, CSS rules, and HTML attributes without external network requests.

Select the Exact MIME Type for Your Inline Asset

Choose from image/svg+xml, text/html, text/css, application/javascript, application/json, or text/plain, paste your code, and copy the complete data:;base64,... URI.

Validate & Inspect Any Data URI Locally

All encoding happens in your browser via TextEncoder. Want to validate or decode an existing Data URI? Use Base64 Validator on 64Decode.

Frequently Asked Questions

Common Questions

What is the syntax of a Base64 Data URI?

Per RFC 2397, a Base64 Data URI follows the format data:<mime-type>;base64,<encoded-data>.

How do I use a generated SVG Data URI in CSS?

Select image/svg+xml, paste your <svg>...</svg> markup, copy the Data URI, and place it inside background-image: url("...");.

Can I generate Data URIs for HTML or JavaScript?

Yes. Select text/html or application/javascript from the MIME Type dropdown to generate valid inline URIs.

Is my source code sent to any server?

No. Encoding happens 100% client-side in your browser.

How can I check if an existing Data URI is valid Base64?

Click Validate Base64 / Data URI to inspect and sanitize it on 64Decode.com.