Why YAML breaks
YAML is designed to be readable, and it buys that readability by making whitespace structural. That is the source of nearly every error: a line indented by three spaces where its siblings use two, or a tab character that looks identical to spaces on screen but is rejected outright.
The type-coercion surprises
The second category is subtler because the file parses fine and the data is simply wrong. YAML 1.1 treats a set of bare words as booleans, so the country code NO becomes false and a version key of on becomes true. A value like 1.20 becomes the number 1.2, losing the trailing zero. Times such as 22:30 can be read as base-60 numbers.
The fix is always the same: quote anything meant to be a string. The JSON preview here exists to make those coercions visible — if a value shows up as false when you wrote no, you can see it immediately.
Where YAML shows up
Kubernetes manifests, Docker Compose files, GitHub Actions workflows, OpenAPI specifications and Ansible playbooks. In most of these a subtle parse difference means a deployment behaves unexpectedly rather than failing loudly, which is what makes checking the parsed output worthwhile.
For the equivalent JSON checks, use the JSON validator and formatter.