SVG optimization, rewritten in Rust.
Fast, native SVG optimization with fixed-point convergence. Available as a CLI and Node.js library.
Getting started
npm install svgm-node- 0x faster
- On the current benchmark corpus
- 0% compression
- Across real exported SVGs
- 0 invocation
- Converges in a single run
Benchmarked against SVGO 4.0.1 on a corpus of 100 real-world SVGs exported from Figma, Illustrator, Inkscape, and svgrepo. See methodology.
WHY SVGM
Built for modern SVG workflows.
Native performance
A small native binary, written in Rust, with no runtime dependency on Node.js.
Fixed-point convergence
Runs optimization passes until the document stabilizes, in a single invocation.
Safer defaults
Conservative by default, with a focus on preserving output while still reducing size.
BENCHMARKS
Ahead on compression. 33x faster.
SVGM 0.3.7347ms
SVGO 4.0.111,595ms
Speed
33.4x faster across the same real-world benchmark corpus.
SVGM 0.3.718.5%
SVGO 4.0.118.2%
Compression
Ahead of SVGO on compression, winning 55 of 100 files.
Real-world corpus
Tested on 100 production SVGs exported from Figma, Illustrator, Inkscape, and svgrepo.
USAGE
Built for every workflow.
CLI
Optimize files directly from the terminal, with fast native execution.
Rust crate
Embed svgm-core in Rust tools, scripts, and custom workflows.
Node.js
Native addon for build tools, scripts, and server-side workflows.