Developer guide

Validate JSON before you send it

A quick validation pass catches syntax problems before a payload reaches an API, config loader, or test runner.

Open JSON Validator View all tools

The problem

When a request fails with a vague 400 response, validating the JSON body is often the fastest first check.

Example

Input

{
  "email": "[email protected]",
  "active": true
}

Output

Valid JSON. The input can be parsed successfully.

How to fix it

  1. Paste the whole JSON value, not just the part you suspect is broken.
  2. Run validation and read the first parser error. JSON parsers usually stop at the first syntax issue.
  3. After fixing that spot, validate again until the input parses cleanly.

Validation before formatting

Validation is the right first step when you do not trust the input yet. A formatter needs valid JSON before it can safely add indentation or minify the value.

If the first error message is fixed and another one appears, that is normal. JSON parsers usually stop at the first place where the grammar breaks.

Common mistakes

  • Unquoted object keys
  • Single-quoted strings
  • Comments in copied config files
  • Missing or extra brackets

Related problems

FAQ

Does validation send my JSON to a server?

No. The validator runs in your browser, so pasted data stays on your device.

Can valid JSON still fail an API request?

Yes. JSON syntax can be valid while the API schema, required fields, or value types are still wrong.

What should I do after JSON is valid?

Format it for review, then check field names, required values, and the API documentation.