SVGOMG SVGO plugins

Clean up attribute whitespace (cleanupAttrs)

Trims whitespace in attribute values and normalizes quoting so attributes are minimal.

What Clean up attribute whitespace does in SVGO

SVGO applies cleanupAttrs as part of its plugin pipeline. In SVGOMG the toggle is labeled Clean up attribute whitespace (enabled by default). Optimization runs entirely in your browser — files are not uploaded to a server.

Use the SVGOMG optimizer with Show original to compare before and after. If output looks wrong, disable this plugin first, then re-enable related transforms one at a time.

When to enable

Default for most exports with messy attribute formatting.

When to disable

When whitespace in attribute values is semantically significant (very rare).

Watch out for

None.

Try it in SVGOMG

  1. Open svgomg.net and load your SVG (file, paste, or demo).
  2. Find Clean up attribute whitespace in the Features panel (cleanupAttrs).
  3. Toggle the plugin and compare the preview; download when satisfied.

Open SVGOMG

SVGO Plugin Guide

Browse the SVGO Plugin Guide or read the full SVG optimization walkthrough on the homepage.