SVGO
lastmod 2025-07-06created 2025-07-061 edits
SVGO, short for SVG Optimizer, is a Node.js library and command-line application for optimizing SVG files.
Open-source SVG optimization tool based on Node.js
About
- Node.js-based library and CLI tool that automatically removes unnecessary information from SVG vector files
- Reduces file size by deleting/converting parts that do not affect rendering, such as metadata, comments, hidden elements, and default values included in SVG files saved from vector editors
- Can be used in various ways: command, script, library, etc.
- Single-file processing: svgo one.svg two.svg -o one.min.svg two.min.svg
- Recursive processing of an entire folder: svgo -rf path/to/directory_with_svgs -o path/to/output_directory
- 33 plugins are included in preset-default and run in order
- They have intuitive names such as removeDoctype, cleanupAttrs, inlineStyles, removeUselessStrokeAndFill, convertPathData, mergePaths
- The svgo.config.mjs configuration file lets you enable/disable multiple plugins and finely control their behavior