JSON
JSON validator
Check whether a document is valid JSON and find the exact line where it stops being valid. Validation happens as you type, using a deterministic parser instead of a guess.
{ "id": 42, "tags": ["a", "b"],}
Validation you can act on
A bare “invalid JSON” message does not help much. DocuFormat points to a position, labels the error, and highlights the line in the editor so you can fix it in place. The checker reports up to twenty distinct problems, so you can often fix several in one pass.
The mistakes that break JSON most often
| Mistake | Why it is invalid |
|---|---|
{"a": 1,} | Trailing commas are not allowed. |
{name: "x"} | Property names must be double-quoted strings. |
{'a': 'b'} | Strings must use double quotes. |
{"a": 1 "b": 2} | A comma is missing between members. |
{"a": undefined} | undefined is not a JSON value; use null or omit the key. |
// note | JSON has no comment syntax. |
Validation without AI
Checking syntax is a solved problem, so DocuFormat does not ask a model to do it. Validation is deterministic and local. The same input always gives the same verdict, and nothing is uploaded.
If the document turns out to be broken and the cause isn’t obvious, you can then choose to ask AI to propose a repair. See the JSON fixer.
Validate, then format
A valid document can go straight to the JSON formatter to be pretty-printed. If you only need a yes or no, use Validate: you get a clear “valid” result or the list of problems, and your input is left untouched.
Questions, answered
Does it validate against a JSON Schema?
No. DocuFormat checks that the text is syntactically valid JSON. It does not check your data against a schema.
Why does my JSON with comments fail?
Strict JSON has no comments. Editors that accept them are usually reading a superset such as JSONC.
Is validation done by AI?
No. Validation is a local, deterministic parse. AI is only involved if you click AI Fix or Explain.
What is the maximum size?
Local validation has no server limit because it runs in your browser. AI requests are limited to 512 KB of input.