historia.vg / Tools / YAML

YAML Formatter

Paste YAML, pick your options, and copy the result. Handles common YAML files, not the full spec.

CLI alternative

Format YAML with the Python yq. Add -S to sort keys.

yq -y '.' input.yaml

Install:

sudo pacman -S yq
sudo apt install yq