YAML Formatter & Validator Online

Fix inconsistent indentation and validate YAML for Docker Compose, Kubernetes, GitHub Actions and more.

Input —
Drop file to load
0 lines · 0 chars
Output —
0 lines · 0 chars
Ready. Paste something and press Beautify.

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

How to use

  1. Paste YAML or open a .yml file.
  2. Press Beautify or Validate.
  3. 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