Home / Developer / JSON Formatter, Validator and Diff

JSON Formatter, Validator and Diff

Format arbitrary JSON and explain syntax errors with useful locations.

  1. 1Enter input
  2. 2Set options
  3. 3Get results

This calculator runs in your browser. Nothing is sent to a server.

Paste any JSON document. This is a text field, not a preset list.

Optional. Used when operation is Diff. Arbitrary JSON, not a preset.

How it works

  1. Paste a JSON document into the textarea.
  2. Choose indent, key sorting, and duplicate-key policy.
  3. Process to format. Numeric lexemes stay as written.

The document stays in this tab. It is not uploaded.

Large documents are bounded by the tool input limit.

Supported inputs and outputs

UTF-8 JSON text. Output is application/json.

Example

{"id": 9007199254740993} keeps the integer lexeme.

Questions and answers

Why not JSON.parse?

Native parse cannot preserve integers above Number.MAX_SAFE_INTEGER as written.

Related: Base64 and URL Codec WorkbenchJWT Payload InspectorXML Formatter and Validator