Validate JSON
Paste JSON and learn whether it is valid, or see the line and column your browser reports for the first syntax error, or line 1 column 1 when it reports none. Runs in this tab. Your inputs stay in this browser.
Input
Text that should be JSON. Up to 1 MB (1,048,576 bytes) and 50,000 lines. A line break at the very end does not count as another line.
Output
ok when valid. Otherwise error: line L column C, the position your browser's JSON parser reports at the end of its message. When it reports none, the answer is line 1 column 1. Lines and columns start at 1. Columns count UTF-16 code units, as JavaScript does, so an emoji can count as one column (such as ✅), two (most emoji) or four or more (flags, skin tones, joined emoji).
Limits
- Syntax only. No JSON Schema.
- The line and column come from your browser, so they can differ between browsers. Safari, and Chrome and Edge on iPhone and iPad, which use Safari's engine, report no position, so every error there reads line 1 column 1. Chrome and Edge on a computer or Android report none for some errors, such as a comma before
], an unexpected character where a value should be, or JSON that stops right after[, a comma or a colon. - Engine message text is never shown.
How this was made
The core transform was written by hand into the stub registry.
Errors
Input with no characters at all, or over 1 MB or 50,000 lines, names the field and the rule. Input of only spaces or blank lines is reported as a syntax error.
Inputs not stored
This runs in your browser tab. Your inputs are not uploaded or stored. The tool sets no cookie, uses no local storage and sends no analytics about your inputs.