JSON Formatter
Paste JSON and get it back readable. If it's broken, you get the line and column of the problem rather than the raw character offset browsers normally give you — which is the difference between finding a missing comma in ten seconds and hunting through 500 lines. There's also an option to sort keys alphabetically, which makes two versions of the same object easy to diff.
Useful for diffing two objects that hold the same data in a different order.
Nothing is uploaded — this tool runs inside your browser, so your files never leave your device.
Why use this tool
- Validates as it formats, with the error's line and column
- 2-space, 4-space or tab indentation
- Optional alphabetical key sorting for easier diffing
- Runs in your browser — API responses and config never leave your device
How it works
- 1Paste your JSON into the box above.
- 2Pick your indentation.
- 3Copy the formatted result, or fix the error it points at.
JSON Formatter — frequently asked questions
The three usual culprits are a trailing comma after the last item, single quotes instead of double quotes, and unquoted keys. All three are legal in JavaScript but not in JSON, which is why code that works in a browser console fails here.
More developer tools
Looking for something else? Browse all developer tools
Explore the other tools
Same deal everywhere on the site — free, no sign-up, and no watermark on anything you download.
Or see every tool on one page.