The ByteKiln JSON Formatter parses your input using the browser's native JSON.parse() function, then re-serializes it with JSON.stringify() using 2-space indentation. Formatting runs in your browser; your JSON is not sent to a ByteKiln server.
What does formatting do?
Formatting parses JSON and adds whitespace and indentation to make objects and arrays readable. Ordinary JSON values retain their meaning, but JavaScript number precision and duplicate-key handling can change some inputs; inspect the limitations below.
When should you sort keys?
The sort keys option reorders all object properties alphabetically at every nesting level. Use it when comparing two JSON snapshots, normalizing API response shapes, or preparing configs for version control diffs.
Minify vs. format
Minifying removes all whitespace to produce the smallest possible output — useful for query strings, database columns, or API payloads where byte size matters. Format for readability; minify for transmission.
Large integers and duplicate keys
The formatter uses JSON.parse and JSON.stringify, not a lossless JSON parser. An integer such as 9007199254740993 becomes 9007199254740992 because it exceeds JavaScript safe-integer precision. Duplicate keys such as {"id":1,"id":2} keep the last value. Store exact large identifiers as strings, and check duplicate keys before relying on a formatted payload. Syntax validation also does not establish that a payload matches an API schema.