How to use JSON Formatter
Paste JSON, drop a .json file, or start from an example. Formatting uses JSON.parse and JSON.stringify, so the result is standard JSON rather than a guessed rewrite.
- Paste JSON into the input or upload a file up to the size limit.
- Choose 2 spaces, 4 spaces, or a tab, then choose Format or Minify. Control+Enter or Command+Enter also formats.
- Read the tree or the formatted text. Copy or download when the status says the document is valid.
Examples
Pretty-print an API payload
A single-line response such as {"id":1,"tags":["a"]} becomes indented JSON. The tree view collapses nested arrays so you can scan keys without scrolling the raw text.
Catch a trailing comma
Input like {"ok": true,} fails validation and reports the line and column. The previous output is cleared so a failed run is not mistaken for a successful format.
Questions
Is my JSON uploaded?
No. Parsing, formatting, and the tree view run locally in your browser. The file picker reads the file on your device.
Does formatting change key order?
No. JSON.stringify keeps the order produced by JSON.parse, which follows the order of keys in the input.
Can I minify before sending a request?
Yes. Minify emits compact JSON with no added spaces. Copy it or download formatted.json.