About this YAML Formatter & Validator
This YAML formatter normalises indentation and spacing so your YAML is consistent and easier to review. Because it parses the file first, it also works as a YAML validator and reports syntax errors such as bad indentation or duplicate keys.
Features
- Consistent YAML indentation
- YAML syntax validation
- Keeps comments
- Good for docker-compose.yml, Kubernetes manifests and GitHub Actions
How to use
- Paste YAML or open a .yml file.
- Press Beautify or Validate.
- Copy the result.
Frequently asked questions
Why is my YAML invalid?
The most common causes are mixing tabs and spaces, inconsistent indentation, and a missing space after the colon. The validator tells you the line.
Are comments preserved?
Yes. Comments stay in place.
More free formatters
- BeautifyAll-in-one beautifier
- JSON Beautifier & FormatterFormat & validate JSON
- XML Beautifier & FormatterPretty print XML
- HTML Beautifier & FormatterClean up HTML markup
- CSS Beautifier & FormatterFormat CSS, SCSS & LESS
- JavaScript Beautifier & FormatterBeautify JS code
- TypeScript Formatter & BeautifierFormat TS code
- SQL Formatter & BeautifierFormat SQL queries
- Markdown FormatterTidy Markdown docs
- GraphQL FormatterFormat GraphQL queries
- Text BeautifierClean up plain text