Skip to content
Practical guide · Oct 10, 2026

How to validate and format JSON

Find common JSON syntax errors and distinguish formatting from schema validation.

JSON represents objects, arrays, strings, numbers, booleans and null. Object keys require double quotes; comments and trailing commas are not valid JSON.

A valid example

{"active": true, "items": [1, 2, 3]}

Paste this into the JSON Validator. Use the JSON Formatter to indent it, or JSON Minifier to remove optional whitespace.

Syntax versus meaning

Syntactically valid JSON may still omit fields required by an API. Validation here parses JSON; it does not apply a custom JSON Schema or verify business rules. JavaScript numbers also have finite precision, so very large numeric identifiers should be represented as strings when exact values matter.

Keep secrets local

The browser tools do not send pasted JSON to the server. Avoid including credentials in screenshots or shared downloads. JWT Decoder can inspect a token's structure, but decoding cannot establish that its signature is trustworthy.