JSON Validator

Check JSON syntax and see why a payload, fixture or configuration fails to parse.

Runs in your browser. Your input stays on this device.

What this tool does

Parse one JSON value and report its root type or the parser’s syntax error.

When to use it

Check the exact body before debugging a service’s schema or application logic. A valid string root where an object was expected can expose double serialization.

How to use it

  1. Paste the body without HTTP headers.
  2. Select Validate JSON.
  3. Check the root type or fix the reported syntax and run it again.

Worked example

Paste {"status":"ok","items":[1,2,3]} and run Validate JSON. The result identifies the top-level value as an object. Change the end of the array to [1,2,3,] and run it again to see a parsing error. Remove the trailing comma and validate once more. When debugging an HTTP request, validate the exact body you sent so that any characters introduced by serialization or template rendering appear in the input. If an error points near a closing bracket, also inspect the token immediately before it for missing quotes or an extra comma.

Example input
{"jobs":["sync"],"dryRun":true}
Example output
Valid JSON
Root type: object

Supported features and limitations

Validation checks syntax. For trailing commas, use Correct JSON in the JSON Formatter. Application-specific rules require a separate schema.

Common mistakes and edge cases

A browser may accept a JavaScript object literal with single quotes, comments or bare property names. JSON follows a stricter grammar. Each input must contain one complete value, so two valid objects pasted consecutively will still fail. When copying from an HTTP log, remove status lines and header fields first. Some logs wrap the payload in a quoted string and escape the quotes. A result of string can reveal that an object was serialized twice. For a batch of failing fixtures, validate one at a time and keep the first error with the file name. Once that error is fixed, rerun validation because the parser may only report the earliest syntax problem.

Frequently asked questions

Can an API reject a payload that passes?
Yes. The validator checks JSON syntax. The receiving API may still require specific properties, reject extra fields or expect a different type for a value such as items. Check its schema or error response for those details.
Is null valid JSON?
Yes. JSON allows null, booleans, numbers and strings at the top level as well as objects and arrays. An API can still restrict the top-level type to an object or array.

Related tools

Developer guides