JSON Linter Online
A JSON linter checks text against the JSON grammar in RFC 8259 and reports the error with its position. Paste your JSON below to see the first error with its exact line and column and the line marked. If the JSON is broken, run the repair step to get valid JSON back. It is free and needs no signup.
Paste JSON and lint it
The check runs as you type. When the text is valid you see No errors and the JSON indented with two spaces, ready to copy. When it is not, you see the line and column of the error, a message that says what is wrong, and the line itself with a caret under the spot. Repair and re-check runs the site's repair engine in your browser; the repaired text replaces the input only if it parses, so what you see next is checked again. Your JSON is not sent to a server.
The linter stops at the first error, like a parser does. Fix it, or repair, and the next error, if there is one, shows up.
What a JSON linter checks
Syntax only: that the text follows the RFC 8259 grammar. This one checks the structure (brackets and braces that match, commas and colons in the right places), that strings and keys use double quotes, that control characters inside strings are escaped, that numbers have no leading zeros and are not NaN or Infinity, and that there are no comments. It does not apply style rules such as indentation, and it does not warn about duplicate keys. Checking that the data has the right fields and types is schema validation; the JSON Schema generator writes a schema from a sample.
Common errors the linter reports
Each row is the linter's real message for that input, and what the repair step returns:
| Problem | Invalid JSON | Reported error | Repair result |
|---|---|---|---|
| Trailing comma | {
"a": 1,
"b": 2,
} | Line 4, column 1: Trailing comma — remove the comma before the closing }. | {"a":1,"b":2} |
| Single quotes | {
'a': 1
} | Line 2, column 3: Property names must use double quotes ("), not single quotes. | {"a":1} |
| Unquoted key | {
a: 1
} | Line 2, column 3: Property names must be wrapped in double quotes. | {"a":1} |
| Comment | {
// note
"a": 1
} | Line 2, column 3: Comments are not allowed in JSON — remove them. | {"a":1} |
| NaN | {"a": NaN} | Line 1, column 7: "NaN" is not a JSON value — use true, false or null (lowercase), and quote anything else. | {"a":null} |
| Leading zero | {"a": 012} | Line 1, column 7: Numbers cannot have leading zeros (write 7, not 07; quote it if it is an ID). | {"a":"012"} |
| Raw tab in a string | {"a": "x<TAB>y"} | Line 1, column 9: Control character inside a string — escape it (e.g. \t for a tab). | {"a":"x\ty"} |
| Missing comma | {"a": 1 "b": 2} | Line 1, column 9: Missing comma between properties (or a missing }). | {"a":1,"b":2} |
The table shows a raw tab as <TAB>. Note the leading-zero row: repair turns 012 into the string "012", which is a guess. More messages by language are under JSON errors.
Lint, validate and repair: which to use
- Lint (this page) — find the error and see the line; fix it by hand or repair.
- Validate — the same check with a yes/no result.
- Repair — fix everything the engine can and list each change. Cut-off JSON is closed, but the missing data cannot be recovered.
- Format and minify — change only the layout of valid JSON.
For a comparison with the best-known linter, see AI JSONMedic vs JSONLint.
Linting JSON from ChatGPT, Claude and other LLMs
Language models break JSON in a few repeating ways. Each of these was run through the linter and the repair step:
| Problem | Invalid JSON | Reported error | Repair result |
|---|---|---|---|
| Markdown code fence | ```json
{"a":1}
``` | Line 1, column 1: Unexpected character "`" where a value was expected. | {"a":1} |
| Trailing comma | {
"a": 1,
"b": 2,
} | Line 4, column 1: Trailing comma — remove the comma before the closing }. | {"a":1,"b":2} |
| Python True | {"a": True} | Line 1, column 7: "True" is not a JSON value — use true, false or null (lowercase), and quote anything else. | {"a":true} |
| Cut off (truncated) | {
"a": [1, 2 | Line 2, column 13: The array opened at line 2, column 8 is never closed — missing ]. | {"a":[1,2]} |
The AI JSON guides cover each model's habits.
Lint JSON in your own workflow
The repair engine is also an HTTP API: POST /api/repair with the body {"input": "…"}, up to 2 MB, no API key. See the API docs. To learn the rules themselves, start at Learn JSON; all tools are together in JSON Studio.
Frequently asked questions
A JSON linter reads JSON text and reports where it breaks the grammar defined in RFC 8259, such as a trailing comma or a single-quoted string, with a line and column.
Yes. It is free, needs no signup, and runs in your browser.
Yes. Click Repair and re-check: the repair engine fixes the text in your browser, and the result is checked again before it is shown. Heavily cut-off data may not be fully recoverable.
No. RFC 8259 permits neither comments nor trailing commas, so the linter flags both.
Here they do the same syntax check; the validator page gives a yes/no answer, this page adds the formatted output and the repair step. Checking data against a JSON Schema is a separate task.
The JSON Medic newsletter
One JSON error and its fix, weekly, plus new guides and tools. Free.
We send a confirmation link first. Unsubscribe with one click in any mail. See the privacy policy.
Related JSON tools