YAML Sorter
Recursively sort YAML mapping keys alphabetically at every nesting level.
How YAML key sorting works
This tool parses your YAML document, then walks the resulting structure recursively and sorts the keys of every mapping (object) alphabetically — at the top level and inside every nested mapping, no matter how deep. Sequences (lists) keep their original element order since order is usually meaningful there, but if a list item is itself a mapping, that item's keys get sorted too. The result is re-serialized as clean, consistently indented YAML. This is useful for normalizing config files (like Docker Compose or CI pipelines) so diffs only show real changes instead of key reordering noise. Everything runs locally in your browser — nothing is uploaded. For general formatting without reordering, try the YAML Formatter.
Private & free — this tool runs entirely in your browser.