JSON Validator

Check JSON syntax and find the exact error line

Waiting for input.

How to validate JSON

  1. Paste your JSON into the editor. It is checked as you type.
  2. If it is valid, the status line turns green and shows the size in bytes.
  3. If it is invalid, you see the parser's message with the exact line and column, and the cursor jumps to the offending character so you can fix it straight away.
  4. Press Format to pretty-print the corrected JSON, or Minify to compact it.

The most common JSON errors

JSON is stricter than JavaScript. These mistakes cause almost every "Unexpected token" error:

Validation uses your browser's native JSON parser, the same one your JavaScript code uses, so if it passes here it will parse in your app. Nothing is uploaded, which makes it safe for API keys, tokens and customer data.

FAQ

Why is my JSON invalid when it works in JavaScript?

JavaScript object literals allow single quotes, unquoted keys, trailing commas and comments. JSON allows none of these, so code that runs in JavaScript can still be invalid JSON.

Does the validator check against a JSON Schema?

No, it checks syntax only. To check structure, generate a schema with the JSON to Types tool and use a schema validator in your project.

Can I validate JSON Lines (JSONL)?

Each line of a JSONL file is a separate JSON document, so this validator will report an error after the first line. Use the JSONL Validator in the AI category for that format.

Made by BufferMint. We also design and build software products for founders. See our services →

Your files and inputs never leave your device; we only count anonymous visits.