SVG Formatter & Optimizer
Beautify, minify and optimize SVG code: strip comments and redundant attributes, round numbers, live preview - all locally, nothing uploaded
Optimize options (Optimize mode only)
How it works
Everything is parsed and rewritten locally in your browser; your SVG never leaves the device. Three modes: Beautify (re-indent for reading and diffs), Minify (strip redundant whitespace only), Optimize (minify plus structural cleanup, usually 20%-60% smaller).
- Remove comments: drops <!-- --> blocks, which editors like Illustrator and Inkscape generate in bulk.
- Remove metadata: drops title, desc and metadata nodes that do not affect rendering (turn this off to keep an accessible title).
- Remove editor namespace attributes: cleans inkscape:, sodipodi: and other private attributes plus their xmlns declarations.
- Round number precision: rounds coordinates and sizes to the chosen precision, so 10.000000 becomes 10 and path data shrinks a lot.
- Remove hidden and empty elements: drops layers with display="none" and attribute-less empty <g> wrappers.