TBToolbox
Developer Tools

JSON Validator

Check a JSON document for syntax errors without needing to run application code. The validator accepts any standard top-level JSON value and reports whether parsing succeeds. Validation happens locally and checks grammar only; it does not verify a JSON Schema or an API contract.

Runs locally — files stay on your device
Quick answer

Is this valid JSON?

Valid JSON follows the JSON grammar: double-quoted strings and keys, supported values, balanced containers, and no trailing commas.

JSON syntax validation

A JSON validator confirms that text follows JSON grammar: quoted strings, legal escape sequences, correctly paired arrays and objects, valid numbers, and supported literal values. Syntactic validity is separate from semantic correctness.

How it works

The input is parsed with the browser JSON parser. A successful parse returns a validity result; a SyntaxError identifies malformed input. No repair is attempted.

When to use it

  • Check a request body before sending it to an API.
  • Find a missing quote or bracket in configuration.
  • Distinguish valid JSON from a JavaScript object literal.

When not to use it

  • Do not use it as JSON Schema validation.
  • Do not assume valid JSON is safe or trustworthy.
  • Do not expect support for comments or trailing commas.

Worked examples

Valid object

Input
{"status":"ready","count":2}
Expected output
Valid JSON

Names and strings use double quotes.

Valid primitive

Input
false
Expected output
Valid JSON

A top-level primitive is legal JSON.

Trailing comma

Input
[1,2,]
Expected output
Syntax error

The final comma is not allowed.

Common mistakes

Unquoted property names

JavaScript permits some unquoted keys; JSON does not. Correction: Wrap every object key in double quotes.

Single-quoted strings

Single quotes are not JSON string delimiters. Correction: Use escaped double-quoted strings.

Assuming valid means contract-compliant

Grammar does not enforce required keys or types for a particular API. Correction: Run schema validation after syntax validation.

Related operations and differences

JSON Formatter

It validates as part of producing readable indented output.

Limitations and privacy

  • Error wording and position are provided by the browser parser.
  • The validator does not resolve references or apply a schema.

Processing uses browser APIs on this device; the entered content is not sent to the Toolbox server.

Frequently asked questions

Are top-level strings or numbers valid JSON?

Yes. JSON is not limited to objects and arrays.

Why are trailing commas invalid?

They are not included in JSON grammar even though some JavaScript syntax permits them.

Does this check JSON Schema?

No. It checks syntax only.

Can valid JSON still be wrong for my API?

Yes. The API may require properties, types, or ranges beyond JSON grammar.

References