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
- 1Paste your content — a CSS rule, an SVG, a JS snippet, or JSON — into the Content field.
- 2Choose the MIME type that matches the content (image/svg+xml for SVG, text/css for styles).
- 3Read the header line to check the byte count and the base64 length.
- 4Copy the data URI line into a CSS url(), an <img> src, or anywhere a data URI is accepted.
Frequently asked questions
Related tools
Base64 Encoder / DecoderEncode and decode Base64, with URL-safe mode.URL Query String BuilderBuild and parse URL query strings.Password Hash GeneratorGenerate and compare password hashes.Code DiffDiff two code snippets with word-level detail.UUID GeneratorGenerate UUID v4 and v7 in batches, with prefixes.Cron Next Run CalculatorSee exactly when your 5-field cron expression fires next — to the minute.