What does a JSON formatter do?
JSON is a plain text format for data that web APIs, config files and apps use all the time. Machines do not care about spaces, so JSON often arrives as one long line that is hard for a person to read.
A formatter adds line breaks and indentation so the structure is visible, and it checks the text follows the JSON rules. The sample object in this tool is 99 bytes on one line and turns into a clean 4-level tree when formatted. If the text is invalid, you get the line and column of the first problem.
How to use the JSON Formatter & Validator
- Paste your JSON on the left.
- Choose the indent: 2 spaces, 4 spaces or tab.
- Choose whether to keep the key order or sort A to Z.
- Copy or download the formatted result, or read the error and fix the spot it points to.