ToolEmpire

Base64 Data URI Generator

Turn text, CSS, JS, JSON, or SVG into a data:<mime>;base64, URI — UTF-8 safe.

Inputs

Results

// text/plain · 0 bytes → 0 chars data URI
data:text/plain;base64,

About this tool

Paste content, pick a MIME type, and get a complete data URI with a byte-count header. UTF-8 safe for multi-byte characters. Runs in your browser.

How to use

  1. 1Paste your content — a CSS rule, an SVG, a JS snippet, or JSON — into the Content field.
  2. 2Choose the MIME type that matches the content (image/svg+xml for SVG, text/css for styles).
  3. 3Read the header line to check the byte count and the base64 length.
  4. 4Copy the data URI line into a CSS url(), an <img> src, or anywhere a data URI is accepted.

Frequently asked questions

Related tools