Overview
Trims the fat from SVG markup in the browser: strips editor comments, metadata blocks, XML prologs, default attributes, and ids, then collapses the whitespace — with a live readout of exactly how many bytes came off.
How It Works
Paste the SVG, tick the strips you want (comments, metadata and XML prolog, default attributes, ids), and the optimized markup plus a Size reduction stat — percentage and bytes before versus after — update live. Copy the result; there is no download step.
Step-by-Step Usage Guide
- Paste the SVG markup — a design-tool export, an icon set, or your own codebase.
- Choose which strips to apply; the defaults are sensible for icons.
- Check the Size reduction stat and spot-check the output markup.
- Copy the optimized SVG into your project.
Technical Specifications & Standards
This is a purpose-built regex pipeline rather than SVGO: predictable and dependency-free. Strip metadata removes <metadata>, <desc>, the <?xml?> prolog, and <!DOCTYPE>. Strip default attrs removes the combinations design tools emit — fill none, fill-rule evenodd, stroke none, stroke-width 1 — plus data-name and aria-label attributes. Whitespace between tags is always collapsed. The tool parses nothing, so malformed input passes through unchanged rather than erroring.
Targeted Use Cases
- Slimming icon exports from Figma or Illustrator before committing them to a design system.
- Reducing inline SVG weight in a bundle where every icon ships to the client.
- Cleaning tool-generated markup — data-name attributes, editor comments, metadata blocks — out of a sprite sheet.
- Comparing before and after byte counts when arguing for an icon-audit cleanup.
Notes & Gotchas
- Stripping ids breaks <use> references and CSS hooks — the tool warns about this beside the checkbox, so keep ids if you rely on them.
- The keep single-file comments checkbox is present in the UI but currently has no effect on the output; ignore it.
- There is no path simplification, precision reduction, or multipass — for maximum shrinking, follow up with SVGO on the command line.
- The tool does not validate XML: malformed input is processed as text. If nothing shrinks, check that you pasted real SVG markup.
Frequently Asked Questions
Is this SVGO?
No. It is a smaller, predictable regex-based cleaner covering comments, metadata, the XML prolog, default attributes, ids, and whitespace — the wins design-tool exports need most.
Why did my file not get smaller?
Your SVG may already be clean; the strips only remove what is present. An XML prolog or a metadata block is the usual remaining culprit.
Is there a file upload or download?
Neither. Paste markup in, copy markup out — which also keeps everything local.
Are aria-label attributes removed?
Yes, as part of Strip default attrs. Re-add your own accessibility attributes if the icon needs a label.