Rename SVG Ids Sequentially

Renumber every id to prefix-1, prefix-2 … and rewrite url(#), href="#", and clip-path refs

Remove unused ids? Remove unused idsInline use elements? Inline use elements

FAQ

Quick answers

How do I rename SVG ids sequentially?
Set Prefix (default el) and click Rename ids. Elements are numbered in document order: el-1, el-2, el-3. Existing names from Figma or Illustrator are replaced.
How is rename different from Remove unused ids?
Remove unused ids deletes ids that nothing references. Rename keeps every id and only changes the names, which is what you want before merging two SVGs that both used id="Layer_1".
Are url(#) and href="#id" references updated?
Yes. fill="url(#old)", clip-path, mask, filter, marker-*, href="#old", and xlink:href are rewritten to the new sequential ids so paints and clips still resolve.
Does sequential rename inline use elements?
No. <use href="#…"> stays a use; only the target id string changes. Inline SVG Use Elements if you need clones instead of references.
Remove unused ids → Inline use elements → Extract by id → 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