About this tool
The validator follows the JSON standard (RFC 8259) exactly. That makes it stricter than JavaScript: property names need double quotes, single-quoted strings are not allowed, and so are comments and trailing commas. These are the most common causes of "invalid JSON" errors when copying from code. The tool explains each error in plain words and moves your cursor to it.
Format adds indentation and line breaks. Minify removes all optional whitespace, which is useful before embedding JSON in a request. Sort keys orders object keys alphabetically so two documents are easier to compare.
Good to know
- Numbers with more than about 15 significant digits are rounded when formatted, as in JavaScript. Validation itself is exact.
- If an object has duplicate keys, only the last value is kept when formatting.
- Files over about 50 MB may be slow, depending on your device.