JSON and data guides
Fix JSON errors without losing large integers
Check common JSON syntax mistakes, choose repair deliberately, and keep IDs above JavaScript’s safe integer limit intact.
Start with the parser error
JSON uses double-quoted property names and strings. It does not accept comments, single quotes, trailing commas, undefined or NaN. Start at the reported line and column, then check the preceding delimiter.
Formatting changes whitespace; it cannot make invalid JSON valid. A string containing JSON and a JSON object are different values. If your source is a quoted, escaped string, use the string-conversion operation instead of removing backslashes by hand.
{"name":"Ada","active":true,"items":[1,2,3]}Keep identifiers precise
JavaScript Number represents integers exactly only up to 9007199254740991. JSON itself does not impose that limit. Parsing the example with ordinary JSON.parse rounds the ID before any formatting happens.
Nav Tools uses lossless number handling in the ordinary JSON workspace. Format the example and check that the ID ends in 993. For a cross-system API, consider representing opaque IDs as strings. JSON5 and some conversion libraries have different precision limits.
{"id":9007199254740993,"name":"example"}Repair only when you can review the change
Use Format to verify valid input first. If the source is intentionally JSON5, choose JSON5; if it is damaged JSON, choose Repair and inspect the repair diff. Repair may infer missing punctuation, so review the result before using it.
Duplicate property names are not a safe interchange format: RFC 8259 recommends unique names and parsers may handle duplicates differently. Resolve duplicates at the source; do not assume that a prettier output preserved both values.
A short verification workflow
Paste the source into JSON Format and resolve syntax errors. Check numeric IDs, switch to tree or table to inspect the structure, then copy or download the complete result.
Use JSON Diff to compare the result with the expected document. Formatting is not schema validation: when an API has a schema, run JSON Schema validation as a separate check.