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:
- indentation — nesting is set with spaces, and one space too many or too few changes the structure;
- tabs in indentation — YAML doesn’t allow them;
- duplicate keys at the same level;
- unclosed brackets and quotes, invalid escape sequences;
- values that can’t be written without quotes — for example, ones starting with
@or`; - aliases
*namepointing to anchors that don’t exist.
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.