JSON Lint & Validation Guide

How to Fix JSON Syntax Errors

JSON (JavaScript Object Notation) follows strict syntax rules. If your data doesn't adhere to these, parsers will fail.

The Golden Rules of JSON

  1. Double Quotes Only: Keys and string values must be enclosed in double quotes ("). Single quotes (') are invalid.
  2. No Trailing Commas: You cannot have a comma after the last item in an array or object.
  3. Case Sensitivity: true, false, and null must be lowercase.
  4. Valid Numbers: Leading zeros are not allowed (e.g., 05 is invalid, use 5).
Common "JSON Lint" Error: Unexpected token ' in JSON at position...

This usually means you used single quotes instead of double quotes.

How to Use the JSONFriend Linter

Our online editor acts as a real-time JSON Lint tool. As you type or paste:

  • The editor performs a static analysis of your code.
  • Syntax errors are highlighted immediately in the gutter.
  • Formatting tools can automatically fix indentation, making errors easier to spot.

Validate your JSON now