JSON5 Validator
Paste JSON5 to check whether it's valid. Errors point you straight at the problem.
Example
Validation accepts everything JSON5 allows — comments, trailing commas, unquoted keys and single quotes — and reports the first syntax error if the document is invalid.
How it works
The validator runs your text through a JSON5 parser. If it parses, the document is valid JSON5; if not, you get the parser's error message describing what and where the problem is.
Good to know
The JSON5 Validator checks whether a block of text is valid JSON5 — a relaxed extension of JSON that permits comments, trailing commas, unquoted object keys, single-quoted strings, hexadecimal numbers and multi-line strings. You paste your text, and the tool either confirms it parses cleanly or returns the parser's first error showing what went wrong and where. It's aimed at developers who write or edit JSON5 by hand, such as config files (.json5, Babel configs, some tooling settings) where the human-friendly syntax is allowed.
Reach for this when a build step, linter or app rejects a config and you can't tell whether the file itself is malformed or the problem lies elsewhere. Because JSON5 tolerates things standard JSON forbids, a file that fails a strict JSON check may actually be perfectly valid JSON5 — this validator tells you which world you're in before you start debugging.
Reading the result is straightforward: a pass means the document is syntactically valid JSON5 and would parse without error. A failure surfaces the underlying parser message, typically naming the line and column of the first issue. Note that it reports only the first error, so fix that one and re-validate to catch any that follow. Validation is purely syntactic — it confirms the structure parses, not that the data matches a schema or contains the fields your program expects.
A practical caveat: valid JSON5 is not always valid JSON. If your target system only accepts strict JSON, a green result here doesn't guarantee the file will load there — you'd need to remove comments, trailing commas and other JSON5-only features first. Everything runs locally in your browser via a JSON5 parser, so it's safe to paste sensitive payloads and it keeps working offline once the page has loaded.
Frequently asked questions
Is valid JSON also valid JSON5?
Yes — JSON5 is a superset of JSON, so any valid JSON document is also valid JSON5.
Does it change my input?
No — the validator only checks; it never modifies your text.
Is my JSON uploaded anywhere?
No — everything runs in your browser with JavaScript. Your data never leaves your device, so it's safe for sensitive payloads and works offline once loaded.
Is this tool free?
Yes, completely free with no sign-up and no limits.
More JSON tools
People also ask
What is the difference between JSON and JSON5?
JSON5 is a superset of JSON that adds human-friendly syntax: comments, trailing commas, unquoted and single-quoted keys, single-quoted strings, hexadecimal numbers, leading or trailing decimal points, and multi-line strings. Plain JSON allows none of these, so JSON5 is easier to write by hand but is not accepted everywhere standard JSON is.
Can JSON5 have comments?
Yes. JSON5 supports both single-line comments (// ...) and block comments (/* ... */), which is one of its main advantages for configuration files. Standard JSON does not allow comments of any kind.
Why does my JSON5 file work in some tools but not others?
Many tools and libraries only parse strict JSON, so JSON5-only features like comments or trailing commas will cause them to fail. A file can be valid JSON5 yet rejected by a strict JSON parser; check the documentation of the specific tool to see which format it expects.
Are trailing commas allowed in JSON5?
Yes. JSON5 permits a trailing comma after the last element of an array or the last property of an object. This makes it easier to reorder or add lines without comma errors, whereas strict JSON treats a trailing comma as a syntax error.
How do I convert JSON5 to standard JSON?
You parse the JSON5 into a data structure and then serialize it back out as strict JSON, which strips comments, trailing commas, and other JSON5-only syntax. A JSON5 validator only confirms the input parses; converting requires a separate stringify or formatting step.
What file extension does JSON5 use?
JSON5 files commonly use the .json5 extension, though some projects also place JSON5 content in tool-specific config files such as Babel or certain linter configurations. The extension is a convention; what matters is that the parser reading the file supports JSON5 syntax.
Does a JSON5 validator check that my data matches a schema?
No. It performs syntactic validation, confirming the text parses as valid JSON5. It does not verify field names, value types, required properties, or any schema rules; that requires a separate schema validation step.