How to Format, Validate and Repair JSON

A JSON formatter makes compact data easier to read by adding indentation and line breaks. A validator checks JSON syntax. Neither operation alone proves that the values are correct for your application.

How to format JSON online

  1. Open the JSON formatter and validator.
  2. Paste your JSON or open a supported input file.
  3. Format the input and inspect the result. Use minify when you need compact output.
  4. Copy or download the result, then test it in the application that will consume it.

Common JSON syntax errors

JSON property names and string values use double quotes. Trailing commas and comments are not part of standard JSON. The values true, false and null are lowercase.

{"name": "Sample", "active": true, "tags": ["pdf", "tools"]}

If the input is invalid, review the reported location. Fix & Analyze can help repair common syntax mistakes, but an automatic repair may interpret ambiguous input differently from what you intended. Check the repaired values before exporting them.

Valid syntax versus correct data

A syntactically valid object can still contain the wrong date, a missing property or an unexpected value type. Schema checks and analysis can help identify some issues; they do not replace the rules of your own application. Review large numbers carefully when transferring data between tools with different number handling.

Convert JSON to a spreadsheet-friendly format

Use JSON to CSV for tabular data. A flat array of objects is easier to represent as rows and columns than deeply nested structures. Check the headers, missing values and quoting after conversion. To go in the other direction, use CSV to JSON.

Work with other developer formats

Use the YAML formatter for YAML configuration files, or JSON to TypeScript to infer interfaces from example data. Inferred types describe the example; review them against the full range of data your application accepts.

Large inputs can take longer on slower devices. Keep a copy of the original data, and consult the privacy policy before pasting sensitive information.