JSON formatter
Validate JSON, then make it readable or compact. Number precision and key order are preserved.
How to use
JSON formatterPaste JSON or open a local UTF-8 file in Input.
Choose Pretty and an indentation size (2 spaces by default), or Compact to minify it.
Review validation feedback, then copy or save the formatted output.
Formatting without changing your data
Number precision and key order are preserved. Formatting does not change values inside strings.
- Pretty adds indentation and spacing.
- Compact removes unnecessary whitespace.
What input is supported?
Use standard JSON with double-quoted keys and strings. Comments and trailing commas are invalid JSON. See the JSON specification (RFC 8259).
Tool limits: 500,000 UTF-16 code units of input and 1,000,000 of output. Processing runs in a browser worker.