How it works
The input box is parsed with the browser’s own JSON.parse every time it changes, once a leading byte-order mark has been removed, and the value that comes back is printed again with JSON.stringify: at two spaces, four spaces or a tab in Pretty mode, or with no whitespace at all in Minify. Sort keys rebuilds every object with its keys in code-unit order before printing, at every depth, and leaves arrays as they are. The output follows the input as you type, which is why Validate only confirms in words what the formatted output already shows — if there is output, the document parsed.
When parsing fails, the message is the parser’s own. Chrome and Edge report the character offset where parsing stopped, which is turned into a line and column counted on the text as it appears on screen; Firefox already names both, so nothing is appended. Before the parser is quoted, the text outside strings is scanned for whitespace JSON does not allow, such as a no-break space or a zero-width space, and when the first such character is where parsing broke, the error names it with its Unicode code point instead. Replace with regular spaces then swaps them for ordinary spaces or line feeds, without touching the inside of any string.
Once a document parses, the raw text is scanned for integer literals of sixteen or more digits outside strings. Any beyond 9007199254740991 has already been rounded by the parser, so a warning under the output says how many there are rather than letting the rounded value pass unnoticed. Use output as input moves the formatted text back into the input box, so further edits start from the clean copy, and Clear All empties both boxes while keeping the format, indent and sort choices.