SVG to CSS
Encode an SVG as a CSS background-image data URL and preview the image locally.
How to use
- Paste your input or load the example below.
- Adjust the options, then select “Convert to CSS”.
- Review the result, then copy or download it.
No uploads. No account. Processing stays in your browser.
Example input
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M20 6 9 17l-5-5"/></svg>