JSONWeave

JSONWeave / Validate JSON

Processed entirely in your browser

JSON validator with readable error messages

Valid JSON follows a short list of strict rules. When a document breaks one, JSONWeave tells you which rule, where, and what the fix looks like, instead of a single "Unexpected token".

Validate JSON in the workspace

What validation checks

JSONWeave checks that the document is strictly valid JSON. It does not check a JSON Schema, so it validates syntax, not whether the data has the shape your application expects.

Problems it reports

  • Trailing commas after the last item
  • Unquoted property names
  • Single-quoted strings
  • Unterminated strings
  • Missing commas, colons or values
  • Unclosed objects and arrays
  • Unexpected tokens and trailing content after the document
  • Duplicate keys inside one object
  • Comments, which JSON does not allow

Example

The unquoted key, the single-quoted string and the trailing commas below are each listed in the diagnostics panel and marked in the editor.

Invalid: four problems
{
  name: 'api-gateway',
  "ports": [80, 443,],
}

From validation to a fix

Run Validate JSON for a summary. If the document is not valid, open the repair preview to see a corrected version and apply it with one click.

Frequently asked questions

How do I fix invalid JSON?

Read the error list to find each problem, or open the repair preview in JSONWeave to see a corrected document and apply it.

Does it validate against a JSON Schema?

No. JSONWeave checks JSON syntax only.

Related

Ready to try it on your own JSON?

Open the workspace, paste or drop a file, and nothing leaves your browser.

Validate JSON in the workspace