Convert SVG markup to a URL-encoded data URI and a ready-to-paste CSS background-image rule. Runs locally in your browser.
Inline SVG data URIs avoid an extra HTTP request. This tool collapses whitespace, switches double quotes to single quotes, adds the SVG namespace if missing and percent-encodes the characters that break CSS urls. URL-encoding is usually smaller than base64 for SVG. Nothing is uploaded.
Related: JSON Formatter & Validator · Base64 Encode & Decode · URL Encoder & Decoder · SHA-256 / SHA-1 Hash Generator · Unix Timestamp Converter
It inlines small icons in CSS, saving an HTTP request.
URL-encoded SVG is usually smaller than base64 and stays readable.
Keep inline images under a few KB; larger files are better as separate cached files.
More free tools: 150+ free online calculators · Free printable planners