JSON Formatter and Validator
Make messy or minified JSON readable, check that it's valid, or squeeze it onto one line. If something's wrong, you see the line and column of the error with a pointer to it. Your data never leaves your browser.
How to format JSON
- 1Paste your JSON or open a .json file.
- 2Choose Format or Minify, the indent size, and whether to sort keys.
- 3Copy the result or download it as a .json file.
Errors you can find
Invalid JSON shows a message with the line and column of the problem, the line itself and a caret under the spot. Common causes are a trailing comma, single quotes instead of double quotes, or a missing comma between items.
Sort keys
Sorting keys alphabetically, at every level, makes two JSON documents easy to compare and keeps config files tidy. Array order is never changed, because in JSON it carries meaning.
Private by design
API responses and config files often hold tokens and personal data. Formatting happens on your device, so nothing is uploaded or logged.
Frequently asked questions
- Is my JSON sent to a server?
- No. Parsing and formatting run in your browser.
- Does it accept comments or trailing commas?
- No, because standard JSON doesn't allow them, and the formatter tells you where they are so you can remove them.
- How big a file can it handle?
- Tens of megabytes work fine on a normal computer, since nothing has to be uploaded.