Format JSON

Validate, indent or minify without rewriting number tokens or key order.

Processed only in this browser
Input and settings
Processing options

Input and results are processed in this browser, without saving them to a server, URL or persistent browser storage. Clipboard content and downloaded files may remain on your device.

How to use this tool

  1. Paste the original JSON.
  2. Choose two/four spaces or minification.
  3. Review syntax-error locations or copy/save the result.

Preserve a large integer

Input and settings
{"id":9007199254740993,"count":1e3}
Result
{ "id": 9007199254740993, "count": 1e3 }

Numbers are not rewritten to 9007199254740992 or 1000.

Processing rules and reading the result

Standard JSON syntax is checked before formatting string, number and punctuation tokens. Spaces inside strings, key order, duplicates and -0 remain intact. JSON5, comments and trailing commas are not standard JSON.

Limits and checks before use

Supports 2 million input characters, 100 nesting levels and 2 million displayed output characters. Syntax checks do not validate an API schema, required fields or duplicate-key semantics, nor prevent another parser losing numeric precision.

Common questions

Does minification delete spaces inside strings?

No. Only structural whitespace outside strings is changed.

Standards and references

Read alongside this tool