jsondecode.com logo

JSON Linter

A JSON linter checks your JSON against strict syntax rules and highlights any violations instantly so you know exactly where to look. Paste your JSON below — the linter runs in your browser and your data stays private.

Input JSON
Formatted Output
Formatted JSON will appear here

What is a JSON Linter?

A linter is a tool that analyses source code or data files for rule violations and potential errors. A JSON linter applies the JSON specification (RFC 8259) to your input and reports every place where the text deviates — trailing commas, unquoted keys, single-quoted strings, and other common mistakes.

Unlike a basic validator that stops at the first error, a good linter explains what went wrong and where, helping you fix issues in seconds rather than minutes.

JSON Syntax Rules the Linter Checks

RuleValidInvalid
Keys must be double-quoted strings"key": 1key: 1
Strings use double quotes only"hello"'hello'
No trailing commas{"a":1}{"a":1,}
No comments(no comments)// comment
Values: string, number, object, array, true, false, null"value" or 42undefined or NaN

Frequently Asked Questions

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

In practice, they do the same thing for JSON: both check syntax against the specification. The term 'linter' traditionally implies richer error reporting and rule explanations, while 'validator' simply means pass/fail. This tool does both.

Does linting change my JSON?

No. Linting is a read-only analysis. It reports problems but does not modify your data. Use the Beautify button if you also want to reformat the JSON.

Is this linter safe for confidential JSON?

Yes. All linting runs in your browser. No data is sent to any server.

Can the linter fix errors automatically?

The linter highlights the error location and explains the problem, but it does not auto-fix because automatic fixes could silently change the meaning of ambiguous input. You make the decision.

Why do I get a lint error in JSON that works in JavaScript?

JavaScript object literals are more permissive than JSON — they allow unquoted keys, trailing commas, and single-quoted strings. JSON is a strict interchange format; those features are not allowed.

Can I lint JSON5 or JSONC files?

This linter checks standard JSON (RFC 8259). JSON5 and JSONC are supersets with additional syntax. Strip comments and trailing commas before linting with this tool.

Frequently Asked Questions

If jsondecode.com saved you time, share it with your team

Free forever. No ads. No sign-up. Help other developers find it.