JSON Formatter & Validator
Paste an API response or request body to pretty-print it, minify it, sort its keys, or find the exact spot where it is invalid.
๐ Runs entirely in your browser. Nothing you enter is sent to a server.
How testers use a JSON formatter
- Read API responses. A minified response from Postman, DevTools or a log file becomes readable in one click.
- Check a request body before sending. Catch a missing quote before your API returns a confusing 400 error.
- Compare two responses. Sort keys on both, then paste them into a diff tool.
- Write bug reports. Paste formatted JSON into the bug report generator so developers can see the exact payload.
JSON rules people often forget
- Keys and strings must use double quotes.
{'id': 1}is invalid. - No trailing comma after the last item:
[1, 2, 3,]is invalid. - No comments, and no
undefined,NaNorInfinity. - Numbers can't have leading zeros:
007is invalid. Send it as a string if the zeros matter.
Frequently asked questions
Is my JSON uploaded anywhere?
No. Formatting and validation use the JSON parser built into your browser, so API responses with tokens or customer data never leave your machine.
Why does my JSON fail validation?
The most common causes are a trailing comma after the last item, single quotes instead of double quotes, keys without quotes, and comments. JSON allows none of these. The error message shows the line and column where parsing stopped.
What does "Sort keys" do?
It orders every object key alphabetically, at every level. This makes two API responses much easier to compare in a diff tool, because the same fields line up.