Apps / File & Data Converters / JSON Pretty-Print with Sort Keys

↑↓ JSON Pretty-Print with Sort Keys

Paste JSON, pretty-print it with your chosen indent, and optionally sort every object's keys alphabetically — recursively, at every nesting level. Array order is always preserved; only object key order changes.

This is a focused sibling of the JSON Formatter — same validation and pretty-printing, plus the recursive key-sort the formatter doesn't do. Handy for diffing two JSON blobs that only differ in key order, or producing a deterministic/"canonical" layout. Sorting uses a plain case-sensitive string sort (so "Z" sorts before "a", per standard JS string comparison) — it's not locale-aware.

1. Paste JSON

2. Result