SVG to Data URI Generator - CSS & HTML Embed Free | IconVault

Turn any SVG into a CSS-ready data URI or HTML embed snippet. URL-encoded, copy-paste ready. Free, private, runs in your browser.

All tools

SVG to Data URI

Encode SVGs as CSS-ready data URIs for backgrounds and <img> tags.

5 of 5 free uses left

5 of 5 free encodings left - everything happens on your device, nothing is uploaded.

Your snippet appears here

Pick an output format below, then copy or download the ready-to-paste snippet.

About this tool

IconVault's SVG to Data URI generator encodes your SVG into a data:image/svg+xml URI you can paste straight into CSS as a background-image or into HTML as an <img> src. The output is URL-encoded with encodeURIComponent, so characters like # in fill colors are correctly escaped to %23 - the most common reason hand-made SVG data URIs fail in Firefox and other browsers.

Data URIs are perfect for small decorative icons, patterns and textures: they eliminate an HTTP request and keep the graphic inline with your stylesheet. You get both the CSS background-image rule and the HTML embed snippet, each with a one-click copy button New: decode mode recovers the original SVG from any data URI (base64 or URL-encoded), plus extra output formats - raw URI, CSS background, <img> tag and CSS mask., plus the exact byte length of the URI. Everything runs in your browser - nothing is uploaded. Every visitor gets 5 free generations per tool; IconVault Pro ($12/year) unlocks unlimited runs across all tools.

Frequently asked questions

Popular searches

svg to data urisvg data urisvg to data urlconvert svg to data urisvg to data uri convertersvg data uri generatorsvg data uri onlinesvg to base64 alternativesvg background image cssinline svg css backgroundsvg in css urlcss background svg data urisvg data uri css trickencode svg for csssvg url encodersvg encoder onlinesvg css encoderdata:image/svg+xmlsvg img src data uriembed svg in html data urisvg data uri copy pastesvg to data uri freesvg data uri no signupsvg data uri in browsersvg data uri privacysvg data uri generator freeoptimize svg data urismall svg data urisvg data uri sizesvg data uri vs filewhen to use svg data urisvg data uri performancesvg data uri cachingsvg sprite vs data uriicon font alternative data urisvg favicon data uridata uri favicon generator svgsvg data uri reactsvg data uri tailwindtailwind svg background data urisvg data uri wordpresssvg data uri emailsvg in email data uriencode # in svg data urisvg data uri utf8svg data uri charsetsvg data uri quotessingle quote svg data urisvg data uri firefox fixsvg data uri not workingsvg background not showing fixcss url svg encodedencodeuricomponent svgbest svg data uri generatorsvg data uri toolconvert svg to css background freesvg pattern data urisvg texture data uri cssinline svg data uri snippetsvg data uri snippet copy

More tools

Coming soon

CLI

Coming soon

Figma plugin

Coming soon

VS Code extension

Coming soon

Chrome extension

Coming soon

AI icon generator

Coming soon

Team workspaces

Coming soon

View all 10+ tools →