Learn

How to validate JSON

Direct answer: To validate JSON, parse it with a strict JSON parser (or online validator). If you also need structure guarantees, validate the parsed value against a JSON Schema. BracketView highlights syntax errors as you type and supports schema validation in the workspace.

Step-by-step

  1. Step 1

    Paste the payload

    Open BracketView and paste your JSON into the editor.

  2. Step 2

    Fix syntax errors

    Resolve missing commas, unquoted keys, and trailing commas until the document parses.

  3. Step 3

    Validate against schema (optional)

    Open the Schema tool, paste a JSON Schema, and review field-level errors.

Examples

Invalid (missing comma)

{
  "ok": false
  "code": 400
}

Valid

{
  "ok": false,
  "code": 400
}

FAQ

What is the difference between syntax validation and schema validation?

Syntax validation checks whether text is valid JSON. Schema validation checks whether the data matches an expected shape.

Try it in BracketView