SVG Cleaner

Clean SVG code and remove transforms

Upload an SVG and flatten transforms into the path data, remove editor metadata and namespaces, strip IDs, and shrink file size. Everything runs locally in your browser.

Original

Cleaned

Cleaned SVG code

Flatten transforms and remove editor cruft

Logos exported from Illustrator, Figma, or Inkscape often carry nested transforms, editor-specific namespaces, comments, and metadata that bloat the file and break some rendering pipelines. This SVG cleaner bakes transforms directly into the geometry, converts basic shapes to paths, removes editor attributes, and outputs clean, portable SVG code.

For maximum compression of the final vector, run the result through the SVG Optimizer. Transforms are kept untouched when a file uses text, images, or clip paths that cannot be flattened safely.

How it works

  1. 1 Upload an SVG file.
  2. 2 Choose to flatten transforms, remove IDs, and drop width/height.
  3. 3 Clean the file and compare the original and cleaned previews.
  4. 4 Copy the cleaned code or download the optimized SVG.

Features

  • Flatten transforms Bakes nested transforms into the geometry so the SVG has no transform attributes left.
  • Remove editor metadata Strips Inkscape, Illustrator, and Sketch namespaces, comments, and metadata.
  • Optional ID stripping Remove generated IDs and classes, and drop width/height while keeping the viewBox.
  • File size savings See the before and after size and the percentage saved instantly.

What you can use it for

  • Clean logos before inlining SVG in HTML or components.
  • Flatten transforms so animations and edits behave predictably.
  • Remove bloat added by design tools on export.
  • Prepare SVG files for the SVG optimizer or icon pipelines.

SVG Cleaner FAQ

What does "flatten transforms" mean?

It applies every transform (translate, scale, rotate, matrix) directly to the path coordinates and removes the transform attribute, so the shape stays in place but no longer depends on transforms.

Is flattening always safe?

For typical icons and logos, yes. To stay safe, transforms are kept when a file uses text, images, clip paths, or masks that cannot be flattened without changing the result.

Does this replace SVGO?

It complements it. Use the SVG cleaner to flatten transforms and remove editor data, then run the SVG optimizer for maximum compression.

Will it change how my SVG looks?

No. The cleaned SVG renders the same; it just removes hidden data and simplifies the structure.

Is my file uploaded?

No. Cleaning happens locally in your browser.

Is it free?

Yes, the SVG cleaner is free with no account required.

Related free tools

Keep building your brand asset set with these related free tools.