Skip to content
JSON Runs offline

JSON Formatter

Format, indent and inspect JSON with clear error reporting.

Input

0 chars

Output

0 chars
Ctrl

Questions

What makes a JSON document invalid?

The most common causes are trailing commas, single-quoted strings, unquoted object keys, comments, and NaN or Infinity values. All of these are valid JavaScript but none are valid JSON. The error message below the input names the line and column so you can go straight to the problem.

Does sorting keys change my data?

No. Object key order is not significant in JSON, so sorting produces a semantically identical document. It is useful when diffing two API responses that return the same fields in different orders.

Is there a size limit?

Formatting happens in your browser, so the practical limit is your available memory. Documents up to a few megabytes format instantly; very large files may briefly freeze the tab while parsing.

Open JSON Validator

JSON Validator

Check whether JSON is valid and see exactly where it breaks.

JSON