Dad’s Data formats tools

JSON Validator

Validate JSON with precise line & column error locations. Detects duplicate keys and number precision loss.

JSON Input
Validation Result

Paste JSON to validate

Errors, warnings, and stats will appear here.

JSON Validation Reference

A validator does more than just detect that JSON is malformed — it gives you precise line and column numbers for every error, making it straightforward to fix problems in large documents. It also catches issues that a formatter might silently swallow: duplicate keys (where one value gets discarded), and large integers that exceed JavaScript's safe integer range (2⁵³ − 1), which parsers round without warning.

Common JSON Errors

Error message fragmentWhat it meansHow to fix
Unexpected token '}'Missing comma between two elements or propertiesAdd , between properties
Expected double-quoted property nameUnquoted or single-quoted keyWrap the key in double quotes
Trailing commaComma after the last element in an array or objectRemove the trailing ,
Unterminated stringA string was opened with " but never closedFind the unclosed " and close it
Unexpected non-whitespace characterStray character such as a // commentRemove all comments — JSON has no comment syntax
Duplicate keyThe same key appears twice in a single objectDeduplicate keys; most parsers silently discard one
Number precision lossAn integer larger than 2⁵³ − 1 was parsed as a JSON numberUse a string type for large IDs (Snowflake, database bigint)

What an invalid document looks like

Invalid JSON — two errors in one document
Input
{
  "name": "Alice",  // user name
  "active": true,
}
Output
Line 2: Unexpected token '/' — JSON does not support comments
Line 4: Trailing comma after last property

What JSON Validators Don't Check

Valid JSON is not the same as correct data. A validator checks syntax only — it verifies that the document is a well-formed JSON string, but it has no knowledge of what your application expects. A document can be syntactically valid yet have the wrong field names, wrong value types, missing required properties, or values outside an acceptable range. Use the JSON Schema Validator tool to define and enforce structural and type-level rules against a JSON Schema.

Frequently Asked Questions

Your files stay on your computer. Dad promised.

Data formats tools

Search the Data formats tools