JSON Wrench

JSON Validator

Input
All processing happens in your browser. Your JSON is never uploaded.
Output
Paste JSON on the left. It's checked as you type. Broken JSON gets an exact error location and a one-click fix.

Paste JSON into the editor above and it is validated as you type. Valid JSON is formatted on the right. Invalid JSON gets an error card with the exact line and column, a plain-English explanation of what went wrong, and a one-click fix when the mistake can be repaired safely.

The example loaded above is missing a comma after the email line. That is one of the most common JSON mistakes, and most validators just report Unexpected string without telling you where the comma belongs.

Example

Input
{
  "id": 7,
  "email": "ada@example.com"
  "roles": ["admin"]
}
Result in JSON Wrench
{
  "id": 7,
  "email": "ada@example.com",
  "roles": [
    "admin"
  ]
}

What the validator checks

JSON Wrench uses its own strict parser instead of reading the browser's error message, so the result is the same in every browser and every error is named precisely. It follows the JSON standard (RFC 8259) exactly: double-quoted keys and strings, no trailing commas, no comments, and only true, false, null, numbers, strings, objects and arrays as values.

  • Exact line and column for the first error, with the problem underlined in the editor.
  • A specific name for the mistake (trailing comma, missing comma, unquoted key, Python value and about twenty more) instead of a generic "unexpected token".
  • Every other problem auto-fix would change is also underlined, so you can see them all at once.
  • "Go to line" jumps the cursor to the error.
  • Validation runs locally and pauses for inputs over 5 MB to keep the page responsive.

Validate, then fix

When the input can be repaired, the Fix button turns blue. Press it (or Ctrl/Cmd + Enter) to see the repaired JSON on the right, with a list of every change showing the text before and after. Your input is never changed until you click "Replace input with this", and Ctrl/Cmd + Z undoes that too.

If auto-fix cannot repair the input safely, it says so and changes nothing rather than guessing.

Why JSON that "looks fine" fails

Many invalid documents are valid JavaScript, Python or JSON5, which is why they look correct. JSON is stricter than all of them. Other common causes are invisible characters copied from Slack, Notion or a web page, curly "smart" quotes added by a word processor, and an API that returned an HTML error page instead of JSON. JSON Wrench detects and explains each of these.

Frequently asked questions

Is this JSON validator free?

Yes. There is no account, no paywall and no limit on how often you use it.

Is my JSON uploaded anywhere?

No. Validation, formatting and repair all run in your browser. The JSON you paste is never sent to a server.

Does it support JSON5, comments or trailing commas?

It validates against standard JSON, so comments and trailing commas are reported as errors. Auto-fix can remove them for you and produce standard JSON.

How large a file can it validate?

Documents up to 5 MB are validated as you type. Larger inputs can still be pasted, but validation pauses.

More JSON tools