YAML validator: check YAML syntax online

Validate YAML and see every error with line and column: bad indentation, tabs, duplicate keys, unclosed brackets. Format YAML without losing comments.

Convert YAML to JSON

How to use

Paste YAML into the box — it’s checked as you type. If there are errors, a list appears under the box: line, column and what’s wrong. Click an error to put the cursor right there. With no errors, the validator tells you how many documents the text has and shows the same YAML with clean indentation, ready to copy or put back into the input.

Validation runs in your browser and the text isn’t sent anywhere, so configs with passwords and tokens are fine.

What’s checked

YAML 1.2 syntax:

The validator doesn’t check whether the fields are right for a particular program — the Kubernetes, Docker Compose or GitHub Actions schema. It checks YAML syntax; compatibility with a particular application also depends on its YAML version, supported tags and schema.

Formatting

The formatted YAML keeps comments, key order and values — only indentation and spacing change. Long lines aren’t wrapped.

FAQ

What does “a nested value on the same line as its key” mean? Usually an extra space of indentation: the line is shifted further than its neighbors, and YAML tries to read it as part of the previous key. Line it up with the other lines at the same level.

Why aren’t tabs allowed? The standard rules them out: editors show tabs at different widths, which would make nesting ambiguous. Replace tabs with spaces.

How many documents are in my file? Documents are separated by a --- line. Many Kubernetes files hold several, and the validator checks each one.

How do I convert YAML to JSON? With the YAML to JSON converter.