{}JSON-Validator.net
Tool Guide · 5 min read

JSON Lint – Online JSON Linter

JSON linting means checking your JSON for syntax errors against the RFC 8259 standard. Paste your JSON below for an instant lint check — no setup, no server calls, completely private.

🔍

Lint Your JSON Now

Free online JSON linter — real-time syntax checking with precise error messages.

Open JSON Linter

What Is JSON Linting?

A JSON linter reads your JSON text and checks every character against the RFC 8259 specification — the official JSON standard. If anything violates the spec, the linter reports the exact line and character position of the error.

The terms JSON lint, JSON linter, and JSON validator are used interchangeably. They all mean the same thing: syntax validation against the JSON standard.

Linting happens automatically when you call JSON.parse() in JavaScript or json.loads() in Python. An online JSON linter like this one shows the error before you try to parse — saving you a runtime exception in production.

What Does a JSON Linter Check?

A strict RFC 8259 JSON linter verifies all of the following:

✓ Double-quoted strings
All strings — including object keys — must use double quotes. Single quotes, backticks, and unquoted values are not valid JSON.
✓ No trailing commas
The comma after the last element of an object or array is forbidden. {"a": 1,} is invalid — it must be {"a": 1}.
✓ No comments
JSON does not support // single-line comments or /* */ block comments. Remove all comments before passing to a JSON parser.
✓ No undefined / NaN / Infinity
Only six value types are valid: string, number, boolean, null, object, and array. undefined, NaN, and Infinity are JavaScript values, not JSON values.
✓ Matched braces and brackets
Every { must have a matching }. Every [ must have a matching ]. Mismatched or missing brackets are one of the most common JSON errors.
✓ Commas between elements
Object properties and array items must be separated by commas. Missing commas are a common source of parse errors.
✓ Valid Unicode strings
JSON strings must be valid Unicode. Control characters (U+0000 through U+001F) must be escaped as \uXXXX sequences.

6 Most Common JSON Lint Errors

These six errors account for over 90% of all invalid JSON. Each example shows the broken JSON and the corrected version:

Trailing comma
Invalid
{"name": "Alice", "age": 30,}
Fixed
{"name": "Alice", "age": 30}
→ Remove the comma after the last item in any object or array.
Single quotes
Invalid
{'name': 'Alice'}
Fixed
{"name": "Alice"}
→ Replace all single quotes with double quotes — for both keys and string values.
Unquoted keys
Invalid
{name: "Alice", age: 30}
Fixed
{"name": "Alice", "age": 30}
→ Wrap all object keys in double quotes.
JavaScript comment
Invalid
{"key": "value" // this is a comment
}
Fixed
{"key": "value"
}
→ Remove all comments. JSON does not support // or /* */ comments.
undefined value
Invalid
{"score": undefined}
Fixed
{"score": null}
→ Replace undefined with null. JSON supports null but not undefined.
Missing comma
Invalid
{"a": 1
"b": 2}
Fixed
{"a": 1,
"b": 2}
→ Add a comma between every property in an object and every item in an array.

JSON Lint vs JSON Schema Validation

JSON linting and JSON Schema validation are two different levels of checking:

JSON Lint
JSON Schema
What it checks
Syntax only (RFC 8259)
Structure + data types + constraints
Example catch
Missing closing bracket
"age" must be a positive integer
Tool needed
Any JSON parser / linter
ajv, jsonschema, Ajv, Zod
Speed
Instant
Requires a schema definition
Use case
Quick syntax fix
API validation, config file enforcement

Frequently Asked Questions

What is JSON linting?+

JSON linting is the process of checking a JSON string for syntax errors against the official JSON specification (RFC 8259). A JSON linter reads your JSON and reports any violations — such as trailing commas, single quotes, unquoted keys, or comments — so you can fix them before parsing.

What is the difference between a JSON linter and a JSON validator?+

In practice, JSON linting and JSON validation are the same thing. Both check that JSON conforms to the RFC 8259 standard. The term 'lint' comes from code linting in programming, where a linter checks for errors and style issues. For JSON, linting specifically means syntax validation — checking that the structure is valid.

Why does JSONLint say my JSON is invalid?+

JSONLint reports invalid JSON when your JSON violates the RFC 8259 specification. The most common causes are: single quotes instead of double quotes, trailing commas after the last item in an object or array, unquoted property keys, JavaScript comments (//, /* */), and undefined or NaN values. Check the error message for the exact position of the problem.

Can I use JSON lint to check JSON files?+

Yes. Open the JSON file in any text editor, copy the contents, and paste them into an online JSON linter like json-validator.net. The linter will instantly tell you if the file contains valid JSON or point to the exact line of the error.

Is JSON5 valid JSON?+

No. JSON5 is a superset of JSON that allows single quotes, trailing commas, and comments, but it is NOT valid JSON per the RFC 8259 standard. A JSON linter will reject JSON5 syntax. If you need to use JSON5, you must use a JSON5 parser specifically.

Ready to Lint Your JSON?

Free, instant, private. No sign-up. No ads. Results in milliseconds.

Open JSON Linter

Related Guides