Skip to main content

JSON Validator

Runs locally

Validate strict JSON, JSON5, JSONC and JSON Schema with line and column diagnostics.

What is JSON Validator?

Validate strict RFC 8259 JSON, JSON5, JSONC, and NDJSON payloads with exact line and column diagnostics. Check documents against a JSON Schema (draft 07 or 2020-12), detect duplicate keys and precision loss, and repair common syntax errors locally.

How to use JSON Validator

  1. Step 1

    Paste or drop your JSON payload into the editor.

  2. Step 2

    Select Strict JSON, JSON5, JSONC, or NDJSON in Options.

  3. Step 3

    Inspect any syntax errors, duplicate keys, or large-integer warnings in the Problems panel.

  4. Step 4

    Optionally paste a JSON Schema to validate structure and required fields with AJV.

  5. Step 5

    Click Auto-fix to repair trailing commas, comments, or single quotes.

Features

  • Exact line and column parser diagnostics with click-to-jump
  • JSON Schema 2020-12 and Draft-07 validation using AJV
  • Duplicate object key detection and BigInt precision warnings
  • Auto-fix repair for malformed JSON payloads
  • BOM detection and UTF-8 validation
  • Web Worker execution for multi-megabyte files

Example

Input

{"name": "nexatools", "port": 3000,}

Output

Line 1, Col 35: Trailing comma is not allowed in strict JSON.

Strict JSON rejects trailing commas; Auto-fix removes the comma and formats the output.

Frequently asked questions

Does JSON Validator upload my payload?

No. Validation runs locally in your browser using a Web Worker.

Can I validate against a JSON Schema?

Yes. Switch to Schema mode and paste any Draft-07 or 2020-12 schema.

Why does it warn on duplicate keys?

RFC 8259 allows duplicate keys syntactically, but parsers silently overwrite earlier values, causing subtle bugs.

How do I fix invalid JSON quickly?

Click Auto-fix in the Problems panel to repair common mistakes automatically.