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.
SVG to Data URI
Encode SVGs as CSS-ready data URIs for backgrounds and <img> tags.
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
More tools
SVG to PNG
Convert any SVG to high-res PNG with transparency.
SVG Optimizer
Minify SVGs by 40-80% before shipping.
SVG to JSX
Paste SVG, get a clean React component back.
SVG Sprite Generator
Combine multiple SVGs into one <symbol> sprite sheet.
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