JSON Parser

Sorting rebuilds the output and removes comments.

Parse JSON or JSON5 into an interactive tree, or format and minify it as JSON or JSON5. Input and output syntax can be selected independently, syntax errors appear in the output editor, and local files stay in your browser.

Choose JSON or JSON5 independently for the input and output. JSON5-to-JSON5 formatting preserves comments, while conversion, key sorting, and minification serialize the parsed data into the selected output syntax.

  • Unquoted property names are allowed (e.g., {name: "Alice"} instead of {"name": "Alice"});
  • Single quotes can be used for string values (e.g., {'name': 'Bob'});
  • Trailing commas are permitted after the last element in objects or arrays (e.g., {"a": 1, "b": 2,});

Use JSON output for APIs and systems that require standard JSON. Use JSON5 output for developer-maintained configuration where comments, NaN, Infinity, and other JSON5 values need to remain valid.

Related tools: JSON Editor · JSON Formatter · JSON Schema Validator