JSON Validator: Check Strict JSON Syntax and I-JSON Rules

A strict conformance checker for JSON. A hand-written RFC 8259 parser keeps going after the first problem. It lists every error and warning with a line, a column, a byte offset, a code frame, and a plain-English fix. You can switch to the stricter I-JSON profile (RFC 7493) or check JSON Lines one record at a time. Everything runs in this page, and nothing is uploaded.

Mode
Strictness profile

I-JSON adds checks for duplicate keys, number range and precision, surrogates, and noncharacters.

Optional warnings

Line 1, column 1

0 bytes

No JSON yet.

Paste a document, load a file, or try a sample.

Issues

Select an issue to highlight it in the input.

    No issues to show.

    Auto-fix the obvious

    Removes trailing commas and comments, and converts single-quoted strings to double quotes. The result appears below, and your input stays unchanged unless you choose to replace it.

    How it works and its limits

    • Strict, not lenient. The parser accepts exactly the RFC 8259 grammar. When it meets something like a comment or a trailing comma, it records an error and steps past it so that later problems still show up. Recovery is a best guess, so an error can sometimes cause follow-on errors. Fix the first one and check again.
    • Positions. Lines and columns start at 1. Columns count Unicode characters, and a tab counts as one column. Byte offsets start at 0 and count UTF-8 bytes of the text in the editor. Browsers turn CRLF into LF inside text boxes, so offsets in a CRLF file are one byte short for each earlier line.
    • Profiles. Under RFC 8259, duplicate keys and lone surrogates are warnings: the RFC allows them but says behaviour is unpredictable. Under I-JSON they are errors, and so are noncharacters, because RFC 7493 says MUST NOT. RFC 7493 only says SHOULD NOT for numbers outside double range or precision, so those are warnings. Integers count as exact only up to ±9007199254740991.
    • Auto-fix is deliberately small. It only removes trailing commas and // and /* */ comments, and it rewrites single-quoted strings. It does not add quotes to keys, add missing commas, or guess at broken numbers. Afterwards it checks the result again and lists anything it could not fix.
    • Files. Files are read locally, and the tool checks that they are valid UTF-8. A UTF-16 file is detected only if it starts with a BOM. Live checking turns off automatically above about 1 million characters. Press Validate instead.
    • Limits. The tool reports at most 250 issues, and it stops if nesting goes past 1200 levels. It checks syntax and I-JSON rules only. To check a JSON document against a schema, use the JSON Schema Validator. To reformat a document, use the JSON Formatter.