Processed on your device.
JSON Formatter, Validator & Compare
Syntax check only. Everything runs in your browser.
More information
How it works
- Paste JSON into a box, or open a .json file.
- The page checks the syntax as you type and says what is wrong and where (when the browser reports a position).
- Select Format to pretty-print valid JSON with the indentation you choose. Invalid JSON cannot be formatted - fix it first.
- Add a second document and select Compare. Both sides are formatted the same way first, so only real content changes appear.
What gets checked
JSON syntax only: brackets, commas, quotes, numbers and literals. The page does not check data against a JSON Schema and does not judge whether values are correct.
Error positions
Error details come from your browser's JSON parser. Most browsers report a line and column; when they do not, the page says so instead of guessing.
Privacy
Your JSON is processed on your device. It is not sent to a server for formatting, validation or comparison.
Swipe sideways to see both sides.
How to format, validate and compare JSON
- Paste or open a JSON document in the left box. The syntax check runs as you type.
- If there is an error, read the line and column and the short hint, fix the text, and repeat until it is valid.
- Select Format for clean indentation - 2 spaces, 4 spaces or a tab.
- To compare two documents, paste both and select Compare. Formatting differences are removed first, so reformatting one side does not show as a change.
Compare text in your browser
Your pasted text and opened files are processed on your device for comparison. They are not uploaded to a server to run the comparison.
Free, with no sign-up
Paste two versions, review the differences and copy or download the result. Recent comparisons are saved in this browser's History. Clearing site data removes them.