JSON Validator

Check whether a document is valid JSON and report the first syntax error with its position.

  • Runs locally in your browser
  • No upload required

Try it

Validity
Valid JSON
Summary
The document is valid JSON.

Supported formats

Input
text
Output
text

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

The document is valid JSON.

How it works

  • Scanned the document for JSON tokens.
  • Checked object/array delimiters, string escapes, number grammar, and trailing content.
  • No structural problem was found.
  • Checked 34 characters.

Methodology

  1. Scan the document and validate the token stream against the JSON grammar defined by RFC 8259 and ECMA-404.
  2. Report the first syntax problem with its zero-based character position so an editor can map it to a line and column.
  3. Validate syntax only; the document's shape against an application schema is out of scope.

Usage

  1. Paste a JSON document into the input.
  2. Read the validity result.
  3. If invalid, use the reported position to fix the syntax.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

Valid document

jsonSelect to copy
{
  "json": "{\"name\":\"example\",\"items\":[1,2,3]}"
}

Trailing comma

jsonSelect to copy
{
  "json": "{\"name\":\"example\",}"
}

Limitations

Reading a JSON error position

A position is a zero-based character offset into the exact string you submitted. Editors usually convert an offset into a line and column, which is the fastest way to find a missing comma or an unescaped quote.

Frequently asked questions

Is my JSON uploaded anywhere?
No. Validation runs locally and the document never leaves the page or process.

Sources

  1. RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format — IETF
  2. ECMA-404: The JSON Data Interchange Syntax — Ecma International