Data URI Generator
Turn text, SVG or CSS into a data: URI you can inline directly in HTML or stylesheets.
To create a data URI, paste your content and pick its MIME type. The result can be inlined directly in an img src, a CSS background or a fetch call, removing one network request. URL-encoding is usually smaller than Base64 for SVG.
Runs in your browser- Privacy
- Runs entirely in your browser — nothing is uploaded
- Cost
- Free, unlimited, no sign-up
Frequently asked questions
Should I use Base64 or URL-encoding for SVG?
How to use the data uri generator
- 1Enter or paste your content.
- 2Choose the mime type.
- 3Choose the encoding.
- 4The result appears immediately — copy or download it.
Embed this tool
Put the working data uri generator on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.
Share this tool
Related tools
Base64 Encoder & DecoderEncode and decode Base64 with automatic direction detection, plus file and data-URI support.Base64 to File ConverterDecode Base64, a data URI or hex back into a downloadable file, with the type detected automatically.Base64 to PDF ConverterDecode a Base64 string into a real, downloadable PDF file.File to Base64 ConverterEncode any file — image, PDF, video, font, archive — as Base64, a data URI, hex or a byte array.Multi-Format EncoderEncode text into Base64, hex, binary, URL, HTML entities, ROT13 and more, all at once.PDF to Base64 ConverterEncode a PDF as a Base64 string or a data URI, ready to embed in code.
Last updated
More encoders & decoders