SVG ID Reference Checker

Detect broken SVG ID references, collisions and unsafe url(#id) usage.

SVG id & reference integrity

Find broken, duplicate and unused SVG references.

Paste SVG markup, upload a file or try the built-in sample, then check it to map every id and the references that point to it — url(#id) paint and resource links, href and xlink:href, and aria-labelledby / aria-describedby. The tool flags broken references, duplicate ids and unused ids. It never modifies your SVG and the report is computed from your original markup. Everything runs locally; your file is not uploaded.

Local only Read-only No upload Reference report
Drop an SVG file here or paste SVG markup into the input editor below.
IDs
References
Broken refs
Duplicate IDs
Unused IDs
Status
Preview

SVG preview

Paste SVG markup or try the sample, then click Check ID References.

Processed locally No upload IDs: — Broken refs: — Duplicate IDs: — External: —
Input

SVG markup

Paste a complete SVG document or inline SVG element, then click Check ID References. The markup is never changed.

How It Works

SVG ID Reference Checker maps the ids in an SVG and every reference that points to them, entirely in your browser. Paste SVG markup, upload an .svg file or try the built-in sample, then click Check ID References. The tool collects all id attributes, then scans for references: url(#id) used in fill, stroke, clip-path, mask, filter and marker attributes (and in inline style and <style> CSS), href and xlink:href links such as use, image, pattern and textPath, and aria-labelledby / aria-describedby. It then reports broken references that point to ids which do not exist, duplicate ids that appear on more than one element, and ids that are never referenced, grouped into clear panels with an issue list and a heuristic status. The report is always computed from your original markup — the safe preview rewrites ids only for display and never affects the results. SVGTrim checks SVG ID references locally in your browser. Your SVG file is not uploaded, and the tool does not modify the original markup.

Use Cases

  • Catching broken url(#id) paint, clip-path, mask and filter references after editing or merging SVGs
  • Finding duplicate ids that collide when several icons are inlined on the same page
  • Verifying that use and textPath href links point to ids that actually exist
  • Confirming aria-labelledby and aria-describedby reference real title and desc ids
  • Spotting unused gradients, clipPaths and filters that can be removed to shrink the file

FAQ

What is an SVG id reference?

Many SVG features point to an element by its id — for example fill="url(#grad)" references a gradient, clip-path="url(#clip)" references a clipPath, and <use href="#icon"> references a symbol or element. A reference works only when an element with that exact id exists in the document.

Why do url(#id) references break?

They break when the referenced id no longer exists — often because the element was renamed or removed, the id was changed during optimization, or ids collided and were de-duplicated. The checker lists each broken url(#id), href and ARIA reference with the id it expected and where it came from.

Do duplicate ids cause problems in SVG?

Yes. Ids are meant to be unique within a document. When the same id appears on more than one element, references to it are ambiguous and browsers may resolve to the wrong element, which is why the tool flags duplicate ids as critical issues.

Are ARIA references checked?

Yes. The tool resolves aria-labelledby and aria-describedby, which can list several ids separated by spaces, and flags any that point to an id which does not exist as a critical issue, since the accessible name or description would be lost.

Is my SVG file sent to an external service?

No. SVGTrim checks SVG ID references locally in your browser. Your SVG file is not uploaded, and the tool does not modify the original markup. There is no API call, no AI involved and no external service involved in the analysis.