{ }JSON Workbench

JSON types and data safety

JSON supports objects, arrays, strings, numbers, booleans, and null. A complete JSON document can contain any of these at its top level, including a single string or number.

Objects and arrays

{"user": {"name": "Ada"}, "scores": [8, 10], "active": true, "note": null}

Objects map string names to values. Arrays hold ordered values. Reordering an array can change its meaning, so this tool preserves array order even when sorting object keys.

Strings are not numbers

"00123" is a string and retains its leading zeroes. 123 is a number. A numeric token such as 00123 is invalid JSON. Identifiers, account numbers, and postal codes are often better represented as strings.

Large integers need care

JavaScript safely represents integers only up to 9,007,199,254,740,991 in magnitude. A larger JSON number may round during parsing. If you control the producer, encode exact large identifiers as strings; changing an already rounded result cannot recover the original digits.

Duplicate names are ambiguous

{"mode":"first","mode":"last"}

Different systems can treat duplicate names differently. JavaScript keeps the last value, so formatting this example produces only {"mode":"last"}. This tool warns when it detects duplicate keys. Resolve duplicates in the original data rather than relying on that behavior.

Syntax is only the first check

A valid document can still have missing fields, the wrong units, or an invalid email address. Use a JSON Schema validator for structural rules and application validation for business requirements.

Inspect a JSON document โ†’