JSON5 Validator
Check whether a JSON5 file (comments, unquoted keys, trailing commas allowed) is valid and see the exact position of any syntax error. Runs in your browser.
Suggested tools
About JSON5 Validator
JSON5 Validator checks whether a JSON5 document is valid and shows the exact reason and position when it is not. JSON5 allows comments, unquoted keys, single quotes, trailing commas, hexadecimal numbers and multi-line strings — but it still has rules, and a single typo can stop a build.
Use it to check config files before committing them, or to confirm that a file a tool rejected really is valid JSON5. Everything runs locally in your browser — the text you paste is never uploaded.
How to use JSON5 Validator
- Paste your JSON5 or upload a file.
- Press Validate.
- Fix the reported problem and validate again.
Key features
- Full JSON5 syntax support
- Exact position of the first error
- Also validates plain JSON and JSONC
- Uses the reference json5 library
Example
The value for age is missing.
{ name: 'Asha', age: }JSON5: invalid character '}' at 1:22
When to use JSON5 Validator
- Checking a JSON5 config file before a build fails because of it.
- Confirming whether a file is JSON5 (comments allowed) or strict JSON.
- Finding the exact position of a typo in a long config.
Tips and common problems
- JSON5 allows comments, trailing commas and unquoted keys — but values must still be complete.
- If another tool rejects a file that passes here, that tool expects strict JSON.
- Error positions are shown as line:column.
Frequently asked questions
Yes. JSON5 is a superset of JSON, so any valid JSON passes.
That tool probably expects strict JSON. Remove comments, quote the keys and remove trailing commas — or check it with JSON Validator.
Yes — JSON5 Formatter re-indents it after checking it.