What is the JSON Formatter?
API responses and config files often arrive as one long line of JSON. The formatter lays it out with indentation so you can read it, and checks it is valid at the same time.
Sort keys alphabetically to compare two objects more easily. If the JSON is broken, you get a clear message and the position of the problem.
Features
Pretty print
2 spaces, 4 spaces or tabs.
Sort keys
Alphabetical order for easy comparison.
Error position
Find the exact place a comma or quote is wrong.
Private
Tokens and data stay in your browser.
How to use the JSON Formatter
- 1
Paste your JSON.
- 2
Pick the indent.
- 3
Copy the formatted JSON.
Who it is for
API work
Read responses from REST APIs.
Config files
Tidy package.json and settings files.
Tips for better results
- JSON needs double quotes and no trailing commas. Those are the most common errors.
Questions people ask
Is my JSON uploaded?
No. It is formatted in your browser, so API keys inside it stay private.
Where is my error?
The message shows the line and column where reading stopped.