How is JSON different from a JavaScript object?
JSON is a data format based on JavaScript object syntax, but stricter. Keys and strings must use double quotes, and the only values are strings, numbers, true, false, null, objects and arrays. undefined, NaN, functions and dates cannot be written.
Why are comments and trailing commas invalid?
JSON is meant for exchanging data between programs, so its grammar is kept as small as possible to read the same way in every language. Config files that need comments often use JSONC or JSON5. "Fix common mistakes" can strip comments and trailing commas for you.
What happens to big numbers (integers above 2^53)?
JavaScript numbers cannot represent integers above 2^53 − 1 (9007199254740991) exactly, so JSON.parse turns 9007199254740993 into 9007199254740992. This tool does not use JSON.parse; it keeps the digits as written and warns about numbers that would change. Some values above the limit, such as 9007199254740994, happen to be stored exactly, but arithmetic on them can still be off, so those get a milder note. In code, store such values as strings or use BigInt.
How are line and column counted?
Both start at 1. Columns count Unicode code points: a CJK character counts as one, but combined emoji (family emoji, flags) may count as several, so the number can differ from editors such as VS Code. Because JSON.parse error messages differ between browsers, this tool checks the grammar itself and points to where the error begins.
Are duplicate keys a problem?
The JSON standard does not forbid them, but most programs keep only the last value and silently drop the earlier one. Since that is usually an accident, this tool warns about it (the output keeps both).
Is my JSON sent anywhere?
No. Validation, formatting and the tree view all run in your browser, and files are never uploaded, so confidential API responses and config files are safe to paste.