SVG to Base64 CSS Background-Image

Copy a single background-image: url("data:…") declaration

Shorthand? CSS backgroundClass rule? SVG to Base64 CSS

FAQ

Quick answers

How do I set background-image from SVG Base64?
Paste SVG and click Copy background-image. You get one declaration: background-image: url("data:image/svg+xml;base64,…");
Why not the background shorthand?
background-image leaves size, position, and color free. Use SVG to Base64 CSS Background when you want center / contain in one line.
Will it tile by default?
Yes — CSS repeats background images. Add background-repeat: no-repeat and a size if you want a single icon.
Need a full class block?
SVG to Base64 CSS wraps the same URI in a .icon rule.
SVG to Base64 CSS → CSS background → CSS data URI → SVG to Base64 →
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