About the SVG to Data URI
Small icons and patterns can live directly in your CSS as data URIs, saving a network request. This tool converts SVG markup into a data URI using minimal URL encoding (smaller and still readable) or Base64.
Get just the URI, a ready background-image declaration or an <img> tag. Double quotes are turned into single quotes so the result can sit inside url("…").
How to use the SVG to Data URI
- Paste SVG markup.
- Choose URL-encoded or Base64, and the output form.
- Copy into your CSS or HTML.
Features
- Batch files: run the tool on up to 200 files with the same settings and download every result as one ZIP
- Minimal URL encoding
- Base64 option
- CSS, URI or <img> output
- Character count
Supported formats
- Plain text
Frequently asked questions
Why is URL encoding better than Base64?
Base64 makes files about 33% larger, while minimal URL encoding usually keeps SVGs smaller and gzip-friendly.
Is my text sent anywhere?
No. Everything runs in your browser, so nothing you paste is uploaded or stored.
Added · Last reviewed · Maintained by Sohail Khax · How we test tools