Format YAML Online
Paste YAML into the editor or upload a file and click "Format": the code is re-indented and laid out the same way everywhere, so it is easy to read, review and compare. Choose the indentation you like and copy or download the result.
Indentation is made consistent, extra spaces after colons are removed and comments are kept — handy for Docker Compose, Kubernetes, GitHub Actions and other configuration files.
Why Use This Tool?
- Clean, consistent layout in one click
- Syntax highlighting and line numbers
- Errors shown with line and column
- Free, no registration, works in your browser
How to Format YAML
- Paste your YAML or upload a file
- Choose the options and click "Format"
- Copy the result or download it
Frequently Asked Questions
Is this tool free?
Yes, it is completely free, with no registration and no limits.
Are comments kept?
Yes. Unlike converting to JSON and back, the formatter keeps your comments and the order of keys.
Is my code sent anywhere?
No. Everything runs in your browser: the code you paste or the file you choose never leaves your device.