Skip to main content
ToolsBay

YAML Validator

Validate YAML syntax and preview the parsed result as JSON.

Runs entirely in your browser — nothing is uploaded

YAML

1 line

Parsed result as JSON

1 line

Frequently asked questions

Why does my YAML fail with an indentation error?

YAML uses indentation for structure, and tabs are forbidden — only spaces count. An editor that inserts tabs is the most common cause. Indentation must also be consistent within a block.

Why did "no" become false, and 09 fail to parse?

YAML 1.1 interprets no, off and n as booleans, which surprises people writing country codes. And a leading zero suggests an octal number, so 09 is an invalid octal. Quote the value to keep it a string.

What does the JSON preview show?

The data structure your YAML actually produced. It is the fastest way to confirm that a nested list or map parsed the way you intended, rather than collapsing into a single string.

Does it validate against a schema?

No. This checks that the YAML is syntactically valid and shows what it parses to. Whether the result is a valid Kubernetes manifest or CI config is a separate check your tooling does.

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.

All developer tools