About SVG Inspector
Paste SVG markup or open an .svg file to see the size it renders at and where that size comes from, the root viewBox and namespace, how many elements of each tag it holds, and how much editor metadata came along from the drawing program.
The report also lists anything that can run code or reach outside the file: script elements, event handler attributes such as onclick, javascript: links, embedded frames, foreignObject, external images and stylesheets, and entity declarations. Use it before you put an SVG from somewhere else on a website or into a design system.
How it works
- The markup is checked as XML first; if it is not well-formed you get the line and column of the first problem, just as a browser would refuse it.
- The document is then parsed in a background worker, without being displayed, so nothing in it runs and nothing it references is fetched.
- The rendered size follows browser rules: width and height when both are fixed, otherwise the viewBox proportions, otherwise 300 × 150 pixels. Units such as mm, pt and in are converted at 96 pixels per inch.
- Every element and attribute is checked for content that can run code or load something from elsewhere, and each finding is listed with where it is and its value.
Questions
Is it safe to inspect an SVG I do not trust?
Yes. The file is read as text and parsed as data in a background worker. It is never drawn or inserted into the page, so its scripts cannot run and its external references are never requested.
Does a clean report mean the SVG is safe?
It means none of the patterns this tool knows about were found: scripts, on… handlers, script and HTML URLs, frames, foreignObject, external references and entities. It is a careful check, not a guarantee, so keep serving untrusted SVGs through <img> or sanitise them before inlining.
Why does the size differ from what my editor shows?
Editors often show the document size in millimetres or points. This tool converts those to CSS pixels at 96 per inch, the conversion browsers use, so 25.4 mm reads as 96 pixels.
How large a file can it inspect?
Up to 10 MB of markup, pasted or opened. That covers detailed maps and illustrations; larger files are refused with a message rather than freezing the page.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.