SVG Validator: Check SVG for Errors and Get a Score
Validate an SVG against the most common problems and get plain-language fixes as you type.
SVG Validator tool
1Add your SVG
2Adjust the options
3Preview and download
Input and output codeView, edit and copy the code
Under the hood
How SVG Validator works
An SVG validator checks an SVG for the most common real-world problems and gives a score. It runs locally in your browser and explains each issue in plain language.
Parse as XML
The SVG is parsed as strict XML. If it is not well-formed, the parser error is shown and the checks stop.
DOMParser · image/svg+xmlRun structure checks
The tool looks for a correct xmlns, a viewBox, a size, a title, duplicate ids and broken url(#…) references.
Structure rules- →→→
Run safety checks
Scripts, inline event handlers and external resources are flagged because many platforms block them.
Safety rules Score and explain
Errors cost 30 points, warnings 10 and notes 2. Each issue is explained with how to fix it.
Score ring
What the validator checks
- Errors
- Invalid XML, wrong namespace, duplicate ids, broken references and invalid path data.
- Warnings
- Missing viewBox, inline event handlers, external resources and empty paths.
- Notes
- Missing size or title, and content before the svg tag.
Step by step
SVG Validator process
Four steps validate an SVG. Fix errors first, then warnings.
Paste your SVG
Drop a file or paste code. The sample is full of deliberate problems.
Tip: Results appear as you type.
Read the score
The ring shows your score, and the label says Invalid, Valid with warnings or Valid SVG.
Tip: Errors drop the score fastest.
Fix the issues
Work through the list. Use Format the code to make the markup easier to read.
Tip: The score updates live.
BeforeAfterCopy the corrected code
Copy or download your fixed SVG from the input box.
Tip: Everything runs locally.
Reference
SVG Validator settings / conversion chart
The table lists each check, its severity and how to fix it. The chart shows the scoring weights.
Points deducted per issue
At a glance
- Largest: Error.
- Smallest: Note.
The score starts at 100. Each error removes 30 points, each warning 10 and each note 2.
| Check | Severity | How to fix |
|---|---|---|
| Not well-formed XML | Error | Close tags and quote attributes |
| Missing or wrong xmlns | Error | Add xmlns="http://www.w3.org/2000/svg" |
| Duplicate ids | Error | Make every id unique |
| Broken url(#id) reference | Error | Add the missing element or remove the reference |
| Missing viewBox | Warning | Add a viewBox for scaling |
| Script or event handler | Error or warning | Remove it |
| No title | Note | Add a <title> element |
Answers
SVG Validator FAQ
Questions people ask about the SVG Validator, answered for this specific use case.
Is this an official W3C validator?
No. It checks the most common real-world problems locally in your browser. It is not a full schema validator.
What does the score mean?
It starts at 100 and drops by 30 per error, 10 per warning and 2 per note.
Why is a missing xmlns an error?
Without the SVG namespace, browsers may not treat the file as an SVG image.
Why are scripts flagged?
Many platforms block scripts in SVGs for security, so uploads may be rejected.
Are my files uploaded?
No. All checks run in your browser.
All converters
Every free converter and SVG tool
43 free tools that run in your browser. Pick a converter below, or search by format or task.
No converter matches that search. Try “SVG”, “logo” or “PNG”.