Skip to content
migration.tools
JSON to Formatted JSON

JSON formatter and validator

Check that JSON is valid before a system rejects it, and lay it out so a person can read it. Syntax errors are reported with the line and column, not just “unexpected token”.

Options

JSON

Formatted JSON

The result appears here as soon as there is input.

Processed on this device. Nothing you paste or drop is uploaded.

How to use it

  1. 1Paste your JSON or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the Formatted JSON or download it. Drop several files to convert a batch into one ZIP.

Sorting keys to compare exports

Two systems can serialise the same object with keys in different orders, which makes a text diff useless. Sort the keys on both exports, format them the same way, and a diff shows only real differences in the data.

Questions

Does it accept comments or trailing commas?

No. Those aren't valid JSON, and most parsers reject them. The error message points to the position so you can remove them.