JSON Lint & Syntax Fixer
Lint a payload the way a compiler would: one grammar, one verdict, the exact character that breaks it. When the problem is a known pattern, the auto-fix helper repairs it and tells you what it changed.
Drop a .json file anywhere in this pane — it is read with FileReader in this tab.
Parsed with the native JSON.parse in your browser. Zero network requests, no upload endpoint.
What does ToolGuest JSON Lint check? ToolGuest JSON Lint checks a document against the RFC 8259 grammar in the browser and reports the first violation with its line, column and character offset. It also repairs the four most common patterns — trailing commas, single quotes, smart quotes and comments — when you click auto-fix, then labels the payload as modified.
Lint JSON in three steps
-
1
Paste the payload
Drop in a response body, a config file or a snippet from a ticket. The sample on this page fails linting on purpose so the report is visible immediately.
-
2
Read the lint report
The status badge says Valid JSON or Syntax Error, and the error panel names the line, column and character with a plain-English hint.
-
3
Repair and re-lint
Auto-fix repairs trailing commas, single quotes, smart quotes and comments, then re-runs the linter. The chip above the editor lists what changed.
What JSON linting catches before a payload reaches an API
Linting is validation with an explanation. Both run the same RFC 8259 grammar, but a linter turns the parser's terse message into the rule that was broken and the fix that usually applies, so the person who wrote the payload does not have to know the grammar by heart.
That distinction matters in review. A pull request with a broken OpenAPI example, a package.json with a trailing comma or a fixture with a raw newline passes code review because nobody runs the consumer. Linting the file locally, in the same tab that holds the token, catches it before the pipeline does.
Where linting belongs in a JavaScript, Python and CI workflow
Editors and pre-commit hooks already lint JSON: ESLint with jsonc, Prettier's parser, Python's json.tool, jq, and a dozen CI actions. This page is the manual check for the cases those miss — a payload copied from a chat message, a response pasted from a browser devtools panel, or a config assembled by hand in a dashboard textarea.
Because the lint runs in the browser, it is also the safe option for production payloads that must not leave a laptop: customer records, access tokens, internal identifiers. Nothing is posted, nothing is logged, and closing the tab ends the session.
Lint findings, what they mean and the repair that clears them
The linter reports the first violation only, because parsing stops there. Fix it and re-lint to see the next one; the auto-fix helper clears the four patterns below in a single pass.
| Lint finding | Why it fails | Repair |
|---|---|---|
| Trailing comma | A comma may separate members but never precede a closing brace or bracket. | Delete the comma, or click auto-fix. |
| Single-quoted string | Only double quotes delimit strings and keys in JSON. | Convert both quotes, or click auto-fix. |
| Smart or curly quotes | Typographic quotes pasted from a document are not JSON delimiters. | Replace with straight double quotes, or click auto-fix. |
| Comment in the document | JSON has no comment token, so `//` and `/* */` stop the parser. | Remove the comment, or click auto-fix. |
| Unquoted object key | Member names must be double-quoted strings, unlike a JS literal. | Wrap the key in double quotes. |
| Raw control character | Newlines and tabs inside a string must be escaped. | Use `\n` and `\t` inside the string. |
| Unexpected end of input | A brace or bracket is missing, so the document stops early. | Balance the brackets, then re-lint. |
JSON lint questions
What is the difference between linting JSON and validating JSON?
They run the same RFC 8259 grammar. Validation answers one question: does this parse? Linting adds the rule that was broken and the repair that clears it, so a trailing comma is reported as a trailing comma rather than as an unexpected closing brace.
Does the auto-fix change my data?
It only touches syntax: quotes, comments and commas. String contents, key names, number formatting and member order are preserved, and the result is re-parsed before the badge updates. A chip above the editor lists exactly which repairs were applied so you can review the diff.
Can JSON lint catch duplicate keys?
Not reliably, and that is true of most linters: JSON.parse silently keeps the last duplicate key, so a strict grammar check cannot see the collision. Duplicate keys are a data problem rather than a syntax one, so compare the payload with a diff tool after sorting keys.
Why does the linter report only one error at a time?
Parsers stop at the first character they cannot accept, because everything after that point is unreliable. Fix the reported line and lint again; in practice one missing brace or one stray comma often explains several apparent errors further down the same document.
Can I lint a production payload without exposing customer data?
Yes. The lint runs entirely in the browser with no upload endpoint and no third-party script reading the textarea, so tokens, emails and identifiers stay on the device. That is why this page is safe for payloads that must not be pasted into a server-side validator.
All JSON Formatter, Validator & Developer Tools
Eight pages, one client-side engine. Every tool formats, validates, minifies, sorts keys and lints in the same workspace, and each page opens with the mode its name promises — a validator that lands on errors, a minifier that shows the bytes saved, a linter that repairs common syntax, a viewer that starts in the tree.