OpenReplay Logo
12k
12k

JSON validator

Validate JSON, pinpoint syntax errors by line and column, and repair broken input in one click. Processed locally in your browser, nothing is uploaded.

JSON Waiting for JSON

Paste JSON, drop a file, or

Validate Processed locally Local

About this tool

JSON (JavaScript Object Notation) is a text format for structured data built from objects, arrays, strings, numbers, booleans, and null. A document is valid only when every brace and bracket is balanced, keys are double-quoted, strings use valid escapes, and there are no trailing commas. These are the rules browsers and APIs enforce with their built-in parser. This validator runs your input through the same JSON.parse engine, so a result here matches exactly what your application will accept or reject.

Use it to debug an API response that won't deserialize, check a config file before a deploy, or sanity-check a payload you hand-edited. Paste your JSON and it validates live as you type: valid documents get a stats readout (root type, top-level key or item count, max nesting depth, and byte size), while invalid ones get the parser message plus the exact line and column and a context snippet with a caret under the offending character. Hit Format to pretty-print valid JSON in place, or Repair to fix broken input (single quotes, unquoted keys, trailing commas, comments, truncated documents, Python-style constants) without leaving the page.

Everything runs in your browser. Your JSON is never sent to a server, so it's safe to validate payloads containing tokens, keys, or personal data.

Frequently asked questions

Why is my JSON invalid when it looks correct?

The most common causes are trailing commas (e.g. [1,2,]), unquoted or single-quoted keys, single-quoted strings, and comments. All are valid in JavaScript but rejected by JSON. The validator reports the exact line and column where parsing fails so you can spot the offending character.

Does this validator check JSON against a schema?

No. It checks JSON syntax only: whether the text is well-formed and parseable by a standard JSON parser. It does not validate the structure or types against a JSON Schema; for that you need a separate schema validation step.

Is there a size limit on the JSON I can validate?

There is no fixed limit because validation happens entirely in your browser, but very large documents (multiple megabytes) may parse slowly since they run on the main thread. Nothing is uploaded, so the only constraint is your device's memory.

What does Repair do?

Repair rewrites broken input into strict JSON with character-level fixes: it adds missing quotes and brackets, removes trailing commas and comments, converts single quotes and Python constants (None, True, False), and completes truncated documents. Your original layout is kept where possible, and Undo restores exactly what you pasted.