Category guide
Syntax Validation Tools
A syntax validator answers whether text can be parsed according to a specific format. Start with the language of the file, then use the reported location to inspect a failing token. These checks run in your browser and leave application-specific rules to your own tests.
Choose the right tool
JavaScript Validator
Check JavaScript module syntax and find a parsing error before running application tests.
CSS Validator
Check stylesheet syntax when a missing brace or malformed rule prevents parsing.
JSON5 Validator
Check a JSON5 configuration file that intentionally contains comments or trailing commas.
JSON Validator
Use strict JSON parsing for an API payload or fixture that must not contain JSON5 extensions.
XML Validator
Check whether an XML document is well formed before investigating its application schema.
All tools
Example workflow: diagnose a rejected configuration file
- Identify whether the application expects strict JSON, JSON5, XML, or another supported format.
- Paste the exact file into the matching validator and inspect the reported line and column.
- Fix the syntax, then run the application's own schema or integration checks on the corrected file.
Before you use the result
Passing syntax validation does not establish that values are correct, code is safe, CSS selects the intended element, or XML conforms to an external schema. Use the validator that matches the actual format.
Parse with the right rules
JSON Validator follows strict JSON syntax. A configuration file with comments or trailing commas may instead require JSON5 Validator. Treating the same file as strict JSON creates an error even if its intended parser accepts it. XML Validator checks well-formed markup, while CSS Validator and JavaScript Validator check syntax in their respective languages.
Continue after syntax passes
A parser can accept a document whose fields are still wrong for the application. For example, a valid JSON object may omit a required property, and valid JavaScript may throw at runtime. Use the location reported by the tool to repair syntax, then run the target application’s schema checks, tests, or browser review. Keep representative valid and invalid examples so the same error is easier to recognize next time.