Using the SVG optimizer
The tool parses the SVG and removes comments, metadata, the settings drawing programs save (Inkscape, Illustrator, Sketch, Figma), the line breaks between tags and empty groups, then serializes what is drawn. Geometry stays exact unless you round numbers to one, two or three decimal places; text spacing stays intact. Scripts, links and external resources are rejected. The gzipped size beside the cleaned file's bytes is what a web server that compresses SVG sends.
Worked example
The sample icon, saved from Inkscape, keeps its circle and tick exactly while the program's settings, its comment, the metadata block and the line breaks between tags are removed.
Before you rely on the result
This is careful cleanup, not maximum compression: it joins paths and shortens path data only when you choose, and it shortens a colour only where the short form is the same colour (#ffffff to #fff). Scripts, embedded HTML, animation, links and external image or font references are not accepted. Rounding to one decimal place can visibly shift a small icon, so compare the two pictures before you use the file.
Cite this page
ToolOctopus. “SVG optimizer.” Updated . https://tooloctopus.com/svg-optimizer.
Add an access date if your instructions require one.
Citation formatting uses citeproc-js by Frank Bennett and Citation Style Language styles. License and source code.