JSON Validator

Paste JSON to validate it. Shows exact error location if invalid.

JSON to validate
Result

Get the JSON & API Cheat Sheet

Formatting tricks, jq commands, and common patterns — one page, zero fluff.

How to Validate JSON and Check Syntax

JSON syntax errors are one of the most common causes of broken configs, failed API calls, and mysterious deployment failures. A JSON syntax checker parses your input and tells you exactly where the problem is — missing commas, mismatched brackets, unquoted keys, or trailing commas that are valid in JavaScript but not in JSON.

This validator runs entirely in your browser. Paste in your JSON, and it will either confirm it's valid or point you to the exact line and character where parsing fails. It's faster than waiting for your app to throw a cryptic Unexpected token error at runtime.

Common validation catches include: single quotes instead of double quotes, comments (JSON doesn't support them), trailing commas after the last element, and undefined or NaN values that aren't valid JSON. If you're writing JSON by hand — for a package.json, tsconfig.json, or CI config — validate before committing.

Tips

  • JSON requires double quotes for both keys and string values — single quotes will fail validation.
  • Trailing commas after the last item in an array or object are invalid JSON, even though JavaScript allows them.
  • Comments (// or /* */) aren't part of the JSON spec. Use JSONC or JSON5 if you need them.
  • If you get Unexpected token at position 0, check that your input isn't wrapped in extra quotes (stringified JSON).