SVG to Base64 CSS Data URI

Copy url("data:image/svg+xml;base64,…") for any CSS property

Full rule? SVG to Base64 CSSDeclaration? background-image

FAQ

Quick answers

What is a CSS data URI for SVG?
The string url("data:image/svg+xml;base64,…") that CSS accepts anywhere a url() image is allowed.
Where can I paste it besides background-image?
mask-image, list-style-image, border-image, and generated-content content: url() all accept it.
Why Base64 instead of UTF-8 in the URI?
Base64 is what this intent asks for. It avoids quote-escaping SVG markup inside CSS.
Want the property name included?
Use SVG to Base64 CSS Background Image for a full declaration.
SVG to Base64 CSS → CSS background-image → SVG to Base64 data URI →
Open full editor →

Source

Type or paste SVG markup. The preview on the right updates as you type.

Ready

Live preview

PNG export · 2× for retina