Formatters & Validators
JSON Formatter / Validator
Format, indent, and validate JSON documents.
Guide & explanation
The JSON Formatter / Validator pretty-prints and checks JSON documents against RFC 8259. Paste raw JSON to validate it live, then hit Format for indented output or Minify for a single line.
Valid versus pretty
A document is valid when it follows the JSON grammar: object keys are double-quoted strings, there are no trailing commas, strings contain no raw newlines, and numbers use JSON's format (no leading +, no octal, no NaN or Infinity). Validation checks the shape, not the meaning of the data.
Example
{name:'Ada',roles:["admin",],active:true,}
This is invalid: an unquoted key, single quotes, and trailing commas. The correct form:
{ "name": "Ada", "roles": ["admin"], "active": true }
Reading the results
| Status | Meaning |
|---|---|
| Valid JSON | The document parses; the panel shows the root type, entry count, and depth. |
| Invalid JSON | The parser message, a line:column position, and a snippet of the offending line are shown. |
Common messages: Unexpected token means an out-of-place character (often an extra comma or bracket); Unexpected end of JSON input means a { or [ was never closed.
Options
- Indentation — 2 spaces, 4 spaces, or tab.
- Sort keys — reorders every object's properties alphabetically, handy for diffing two documents.