Paste JSON and every object’s keys are sorted, at every nesting level. Arrays keep their order, since element order usually carries meaning; only the objects inside them are sorted.

I use this before diffing two config files or API responses, and for keeping checked-in JSON fixtures stable so reviews only show real changes.

Keys are compared by their Unicode code points, so uppercase letters sort before lowercase ones (B comes before a). Choose 2 spaces, 4 spaces, tabs or minified output. Processing happens in your browser.