Extract SVG Element by Id

Build a new SVG that keeps only the node with that id — plus defs, not a crop and not unused-id cleanup

Remove unused ids? Remove unused idsCrop to bounding box? Crop to bounding box

FAQ

Quick answers

How do I extract an SVG element by id?
Type the id (the sample uses mark) and click Extract by id. Sibling body shapes are removed. defs stay so url(#…) paints on the extracted node still work.
Does extract delete unused ids from the rest of the file?
No. Remove unused ids walks the whole document and drops ids nothing references. This page copies one node into a smaller SVG and leaves other ids alone — they simply are not in the result.
Does extract crop to the element's bounding box?
No. viewBox is unchanged, so the shape stays at its original coordinates. Crop SVG to Bounding Box if you need the canvas tight around it.
What if the id is a symbol in defs?
The symbol’s children are promoted into the SVG body so the result still paints. Inline SVG Use Elements first if you would rather extract a painted instance.
Remove unused ids → Crop to bounding box → Inline use elements → Convert to symbol →
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