Flatten SVG Nested Groups

Unwrap every nested <g> and bake group matrices into path geometry — not a copy of transform= onto children

Ungroup paths? Ungroup pathsBake transforms? Bake transforms

FAQ

Quick answers

How do I flatten nested SVG groups?
Click Flatten groups. Nested <g> wrappers are unwrapped deepest-first. Each group's transform is multiplied into child path data (and basic shapes), then the empty group is deleted.
How is Flatten nested groups different from Ungroup SVG Paths?
Ungroup lifts children and copies the group's transform= string onto them, so transform attributes remain. Flatten writes those matrices into d and deletes every body group in one pass.
How is Flatten nested groups different from Bake SVG Transforms Into Path?
Bake applies transform= onto path d but leaves the <g> elements in the tree. Flatten both bakes and unwraps, so the result is a flat list of shapes with no groups.
Are groups inside defs or symbol also flattened?
No. Wrappers in defs, symbol, clipPath, mask, pattern, or marker stay put so sprites and clips keep their structure. Body groups from Figma or Illustrator are the ones that collapse.
Ungroup paths → Bake transforms → Remove unused ids → Rename ids →
Open full editor →

Source

Type or paste SVG markup. The preview on the right updates as you type.

Ready

Live preview

PNG export · 2× for retina