YAML Formatter
Format YAML files — Docker Compose, Kubernetes manifests, GitHub Actions and more — with consistent indentation, catching syntax errors.
What is the YAML Formatter?
YAML is a human-friendly configuration format where indentation defines structure, so small mistakes break files.
How does it work?
Prettier’s YAML parser validates the document and re-prints it with consistent indentation and spacing.
Example
Inconsistently indented services are normalised to two spaces per level.
Frequently asked questions
Is my data sent to a server?
No. This tool runs entirely in your browser; nothing you paste is uploaded or stored.
Can YAML use tabs?
No. YAML indentation must use spaces.
Related tools
Enable JavaScript to use this calculator.