How to use the JSON formatter
There is no Run button. The result updates as you type or paste, so you can adjust the settings and watch the output change.
- Paste your JSON into the Input box, or press Paste to read it from the clipboard. Try it loads a small example.
- Set Mode to Beautify for one key or array item per line, or to Minify for a single line with no spaces outside strings.
- Choose the Indent: 2 spaces, 4 spaces or Tab. It only affects Beautify.
- Tick Sort object keys if you want every object ordered alphabetically, at every depth.
- Read the status line under the boxes. It says "Valid JSON" with the total number of keys and the top-level type, or "Invalid JSON" followed by the parser message.
- Press Copy or Download .txt. Use as input moves the result back into the input box, so you can minify a document you have just sorted.
Parsing is done by your browser's own JSON engine, so the text never leaves the page. That makes it reasonable to inspect API responses and configuration files that contain tokens.