Formatting JSON without changing a single value
A JSON formatter has one job: change the spaces and line breaks so a person can read the data, and change nothing else. That sounds easy, and most online formatters still get it wrong in two quiet ways. Both come from the same shortcut. They read the text with the browser's JSON.parse, then write it back with JSON.stringify. The round trip passes through JavaScript values, and JavaScript values cannot hold everything JSON can say.
The first problem is numbers. JSON puts no limit on how long a number can be, but a JavaScript number is a 64-bit float with about 16 significant digits. Twitter, Discord and many databases use 64-bit integer IDs, and a value such as 1234567890123456789 does not fit. JSON.parse rounds it to the nearest value it can hold, and the formatted output shows a different ID with no warning. Decimals suffer too: 1.10 comes back as 1.1, and 1e2 comes back as 100. They are equal as numbers, but the text changed, and a diff or a signature check will notice.
The second problem is key order. A JavaScript object lists keys that look like array indexes first, in numeric order, and the rest after them. So {"b": 1, "10": 2, "a": 3} becomes {"10": 2, "b": 1, "a": 3}. The data is the same, but the file no longer matches the one you pasted, and a person scanning for a key finds it in the wrong place.
This formatter avoids both by never building JavaScript objects. Its parser keeps each number as the exact text it was written with, and keeps each object as a list of key and value pairs in their original order. Writing the result back is then just a matter of adding indentation between the pieces. The only thing that changes inside a value is how a string is escaped: an escape such as \u00e9 is written as the letter é, because both mean the same character to every JSON reader.
The parser also explains mistakes better than the browser does. JSON.parse gives a terse message that differs between Chrome, Firefox and Safari. Here a trailing comma, a single-quoted string, a comment, a Python True or None, or a missing comma each gets its own plain sentence, with the line and column where it happened. Fix that one, and the formatted JSON appears as soon as the input is valid. It all runs on your device, so internal API responses and config files stay with you.