× Search About Posts Code Music Links
Blank Try
experiment
lots
learn
more

SVGO Use

Updated on
Last site update: 1 Sep 2025

Official Help

This is from the help file (svgo --help)

Usage: svgo [options] [INPUT…]

Nodejs-based tool for optimizing SVG vector graphics files

Arguments: INPUT Alias to –input

Options:

flag added to svgofunction
-v, –versionoutput the version number
-i, –input <INPUT…>Input files, “-” for STDIN
-s, –string Input SVG data string
-f, –folder Input folder, optimize and rewrite all *.svg files
-o, –output <OUTPUT…>Output file or folder (by default the same as the input), “-” for STDOUT
-p, –precision Set number of digits in the fractional part, overrides plugins params
–config Custom config file, only .js is supported
–datauri Output as Data URI string (base64), URI encoded (enc) or unencoded (unenc)
–multipassPass over SVGs multiple times to ensure all optimizations are applied
–prettyMake SVG pretty printed
–indent Indent number when pretty printing SVGs
-r, –recursiveUse with ‘–folder’. Optimizes *.svg files in folders recursively.
–exclude <PATTERN…>Use with ‘–folder’. Exclude files matching regular expression pattern.
-q, –quietOnly output error messages, not regular status messages
–show-pluginsShow available plugins and exit
-h, –helpdisplay help for command