Development Tools

JSON Validator

Check whether entered text parses as strict JSON, then report its root value type and source character count. This validates syntax only, not a schema.

Runs in your browserNever uploaded to PagesTools.
Preparing tool…

The focused browser interface is loading.

100% privateYour input stays on this deviceLightning fastNo upload round-tripBrowser-basedProcessing runs on this deviceFree to useNo account required

What JSON Validator does

JSON Validator passes the complete non-empty document to JSON.parse. A successful result identifies the root as object, array, string, number, boolean, or null and reports the input's JavaScript character count.

A parser error means the document is not strict JSON. A success means only that its grammar is valid; it says nothing about required properties, duplicate-key expectations, value ranges, API compatibility, or whether the data is trustworthy.

How to use JSON Validator

  1. Paste the exact JSON document into the input area.
  2. Select Validate JSON and read any syntax error from the browser parser.
  3. On success, confirm the reported root type is what the destination expects.
  4. Run separate schema and business-rule validation before using important data.

Important details

Strict JSON grammar

Property names and strings need double quotes. Comments, trailing commas, undefined, NaN, single-quoted strings, and unquoted JavaScript object keys are not valid JSON and are rejected.

Root values need not be objects

Standard JSON can contain an object, array, string, number, boolean, or null at its root. The tool reports that type rather than assuming every valid document is an object.

Practical uses

  • Check a pasted API payload for strict JSON syntax.
  • Confirm whether a fixture's root is an object, array, or primitive.
  • Locate a parser failure before applying a separate schema validator.

Privacy and limitations

Syntax parsing occurs locally, and the JSON document is not sent to PagesTools. Remove secrets before copying results into tickets, chat, or public examples.

Input is limited to two million characters. The validator does not apply JSON Schema, detect semantically duplicate keys, enforce canonical form, verify signatures, check URLs, or evaluate application-specific safety.

Common questions

Frequently asked questions

Does JSON Validator check a JSON Schema?

No. It checks syntax with JSON.parse and reports the root type. Schema keywords, required fields, formats, and business rules are not evaluated.

Can a valid JSON document contain only a number or string?

Yes. Modern JSON grammar allows any JSON value at the root, including primitives and null. A specific API may still require an object or array.

Why are comments and trailing commas rejected?

They are features of some configuration formats and JavaScript variants, not strict JSON. Removing them deliberately avoids pretending a nonstandard document is portable JSON.