SVG toolkit
Optimise SVGs with SVGO, convert them to PNG, data URIs, CSS backgrounds, and React/JSX components, and combine icons into a <symbol> sprite.
Added
How to use it
Paste SVG markup, open a file, or drop one onto the page.
-
Optimise runs SVGO 3.3.2 (loaded from jsdelivr on first use) with its default preset. Toggles control the plugins that can change how the image behaves: keep the
viewBox(needed to scale), keep IDs (needed if CSS or scripts refer to them), keep<title>/<desc>(needed for accessibility), merge paths, and convert shapes. Set the numeric precision and multipass. The before/after preview and byte counts — raw and Base64 — show what you gained. Check the preview: a precision of 0–1 can distort small icons. -
Convert renders a PNG at any scale through a canvas, and builds the two data URI forms. The URL-encoded form escapes only what it must, so it is usually smaller than Base64 for SVG. It also builds a CSS
background-imagerule and a React component. The component converts attributes to camelCase (stroke-width→strokeWidth,class→className) andstylestrings to objects, and spreads{…props}onto the root. It can emit TypeScript. -
Sprite combines several SVGs into one file of
<symbol>elements, prefixing internal IDs so gradients and clip paths from different icons don’t collide. Each icon is then used with<svg><use href="sprite.svg#icon-name"/></svg>.
⛶ Full screen (or F) gives the before and after previews of the View and optimise tab the whole
screen, each scaled to fit, with the editors and options below them — the browser’s full screen where it
is allowed, otherwise a full-window layer (iPhone). Escape leaves.
SVGs can contain scripts. Previews are rendered as images (<img> with a data URI), which never
run scripts, so pasting untrusted SVG is safe here.
Sharing
Share link copies a URL that opens this tool exactly as configured. ?svg= with the active tab’s settings; longer SVGs are packed into ?s=. The icon sprite works on your files, so only its prefix travels.
For example: svg/?svg=%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2010%2010%22%3E%3Ccircle%20cx%3D%225%22%20cy%3D%225%22%20r%3D%224%22%2F%3E%3C%2Fsvg%3E.
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser — network requests go only to the services named on this page.