Skip to content
toolsdocks

Format and validate JSON

Paste JSON or JSON Lines to format or minify it, see exactly where a syntax error is, and explore the structure as a tree.

Runs on your device
Loading tool…

How to use

  1. Paste JSON or open a file.
  2. Choose indent, sort keys, or minify.
  3. Errors point to the exact line and column.

Worked example

{"a":1,} reports “Expected double-quoted property name at line 1, column 8”, which points at the trailing comma.

Supported formats and limits

InputJSON, JSON Lines
OutputJSON
EngineLossless JSON parser with error positions; tree view; validator for a documented JSON Schema keyword subset

Limitations

  • Comments and trailing commas are not valid JSON; use Repair to remove them.
  • Schema checks cover type, properties, required, items, enum, const, minimum, maximum, minLength, maxLength, pattern and additionalProperties; other keywords are listed as ignored.

Questions

How do I find a JSON syntax error?

Paste the JSON and the error is shown with its line and column, for example a trailing comma in {"a":1,} at line 1, column 8. Comments and trailing commas can be removed with Repair.

Will formatting change my numbers?

No. Numbers and strings are kept exactly as written, so a big integer such as 12345678901234567890 keeps all its digits and key order is preserved unless you sort keys.

Does it validate against a JSON Schema?

It checks a documented subset of keywords (type, properties, required, items, enum, const, ranges, lengths, pattern and additionalProperties) and points to the failing value. Keywords outside the subset are listed as ignored, so it is not a full JSON Schema validator.

Guides

Privacy

Runs on your device. Files and text are processed in this browser tab and are not uploaded.

See the privacy policy for how toolsdocks handles data.