
For developers reviewing an API response or configuration file, JSON Formatter reveals the structure and flags syntax problems before reuse.
Format JSON with clear indentation and validate its syntax before you copy, review or reuse the data. No upload or storage is involved.
The sample holds a small object with a site name and a page count. After formatting, check that the braces line up and that each key-value pair sits on its own line: that is exactly the layout you want when reading an API response.
Input
{"site":"example","pages":3}Output
{
"site": "example",
"pages": 3
}Formatting and validation run only inside your browser, on the text you paste or the file you import. Nothing is transmitted and nothing is kept after you close the page, which is welcome when the data comes from sensitive API responses.
It reports that the document is not valid JSON, which points you in the right direction. For the exact line, compare against a shortened version of the same content or check the console in your code editor.
No, the JSON format does not allow comments. Text that includes them will fail validation, even when it looks close to JSON and reads perfectly well to a human being.
No, this tool sticks to indenting and checking JSON. To produce CSV, YAML or XML, you need a dedicated converter that takes your document as its starting point.