About YAML Formatter
YAML files tend to drift as people edit them: mixed indentation, uneven spacing in flow lists, extra blank lines. The formatter rewrites the file with consistent indentation and spacing while keeping comments and your key order.
It works well for Kubernetes manifests, Docker Compose files, CI workflows and app configs. Files with several documents separated by --- are supported.
How to use it
- Paste your YAML into the Input panel, or Open a .yaml or .yml file.
- Choose an indent of 2 or 4 spaces.
- Review the formatted YAML in the Output panel, and fix anything listed in Problems.
- Copy it or Download it as a .yaml file.
Frequently asked questions
Can YAML be indented with tabs?
No, the YAML spec does not allow tabs for indentation, so spaces are used even if you pick Tab.
Are comments kept?
Yes. Comments stay in place when the YAML is formatted.
Does it handle multiple documents in one file?
Yes. Documents separated by --- are each checked and formatted.