Trailing comma
Input
{
"name": "Ada",
"role": "admin",
}Output
Error: Unexpected token } at line 4 column 1.The trailing comma after "admin" is the actual culprit, but most parsers report the next character.
Lint JSON online by validating syntax and identifying parse errors before using data in code.
JSON linting checks one thing: does the input parse as valid JSON under the strict spec. It does not check business rules, field meaning, expected types, or whether your numbers are within an allowed range. Those are schema checks, handled by JSON Schema or JSON to Schema. Treat linting as the syntax pass — if it fails, no other check will run reliably.
Roughly 90% of lint failures we see fall into a handful of patterns. Knowing them by sight saves you a trip back to the documentation.
If the validator reports a position, jump there in your editor and look at the character before it — the parser usually flags the next character after the actual mistake. If you cannot spot it, paste into AI JSON Repair, run repair, then run lint again on the cleaned output. Once the validator returns OK, the JSON is safe to feed into a typed parser, JSON.parse or your service's JSON middleware.
Input
{
"name": "Ada",
"role": "admin",
}Output
Error: Unexpected token } at line 4 column 1.The trailing comma after "admin" is the actual culprit, but most parsers report the next character.
Input
{ 'host': 'localhost', 'port': 3000 }Output
Error: Unexpected token ' at line 1 column 3.JSON strings must use double quotes. Single quotes are valid JavaScript but invalid JSON.
Repair common JSON syntax errors such as trailing commas, comments, single quotes, missing quotes and unmatched brackets.
JSON guideGuideRemove trailing commas from JSON objects and arrays so strict JSON parsers can read the data.
JSON guideGuideFormat JSON online into readable indentation and copy clean output for APIs, configs and docs.
JSON guideGuideUse a free online JSON formatter with no signup for quick developer copy-and-paste workflows.
JSON guideGuideBeautify minified JSON into readable, indented output for debugging and documentation.
JSON guideGuidePrettify JSON online with clean indentation, validation feedback and one-click copy.
JSON guideGuideJSON linting is a syntax check that confirms whether the input is valid under the strict JSON spec.
No. Linting only validates. Use JSON Formatter when you also want readable output.
Read the line and column, fix the character at that position, and re-run. If you cannot spot the issue, run AI JSON Repair.
ajv validates against a JSON Schema, which is a stricter check on top of the syntax pass. Linting here means just the syntax pass.
Lint each line individually, or use JSON Lines to JSON to convert it into an array first.