22.7k stars · MIT · v4.1.0 (2026-08-24)
Rewrites SVG files several times smaller without changing how they look.
▶Repo detailsthe review · specs · pros & cons · install
What it is
A tool that rewrites SVG files to be much smaller — stripping editor metadata, merging paths, rounding coordinates — without changing how they look. It runs as a command, a config file, or a plugin inside a build.
Why it matters
Every SVG that leaves Penpot, Illustrator or an icon site carries a payload of editor bookkeeping, frequently more than half the file. Those files then sit in your Astro pages and your email headers, where imgproxy (Ed. 6 #2) and lite-youtube-embed (Ed. 7 #8) both went to real trouble to save considerably fewer bytes. It is also what makes an exported Grasppy map from modern-screenshot (Ed. 8 #8) small enough to attach to an email without apologising for it.
- Seconds to run, nothing to host, no account, no cost.
- Safe defaults — the standard preset rarely changes appearance.
- Drops into a build step or a git hook so it happens without you remembering.
- Aggressive settings can break gradients, filters and animated SVGs — always look at the output.
- It only helps if it runs on every asset; one hand-copied file undoes the habit.
- Nothing to do with raster images — photographs and screenshots stay imgproxy's problem.
npx svgo
