YAML Validator & Linter
Check Kubernetes manifests, GitHub Actions workflows, docker-compose files and any other YAML. Errors show the line and column; duplicate keys, which many tools silently accept, are flagged.
Why "NO" turns into false: YAML's type guessing
YAML guesses types for unquoted values. YAML 1.1 (PyYAML, older Ruby and Go libraries) treats many words as booleans and numbers; YAML 1.2 narrowed the rules. Flip the version and watch the JSON change.
| YAML | Meant as | Becomes (YAML 1.1) |
|---|---|---|
country: NO | ISO code for Norway | false booleanchanges in 1.2 |
enabled: on | a feature flag | true booleanchanges in 1.2 |
answer: yes | a survey answer | true booleanchanges in 1.2 |
port: 010 | a zero-padded number | 8 numberchanges in 1.2 |
duration: 12:30 | a time of day | 750 numberchanges in 1.2 |
version: 1.10 | a version string | 1.1 number |
size: 1e3 | scientific notation | 1000 number |
owner: ~ | the tilde | null null |
country: "NO" | quoted | "NO" string |
1.1 → false boolean · 1.2 → "off" string
The fix is always the same: quote values that must stay strings ("NO", "1.10", "010"). The JSON to YAML converter on this site does that for you.
How it works
YAML structure comes from indentation, and the spec forbids tab characters for indentation. Most "mapping values are not allowed here" errors are a missing space after a colon or a line indented one space too far.
Files with several documents separated by --- are validated document by document.
Choose YAML 1.2 (the current spec, used by most modern libraries) or 1.1 (still used by PyYAML and older tools). The version changes how bare words like yes, no and on are typed; the explainer below shows exactly how.
Everything above runs in JavaScript inside this tab. Your data is not uploaded. Inputs are remembered in this browser only so they survive a reload; you can switch that off on the privacy page.
Questions
Why is "mapping values are not allowed here" so common?
It means the parser found a colon followed by a space where it did not expect a new key, typically because a value contains ": " and is not quoted, or because indentation is off by one.
Can YAML use tabs?
Not for indentation. The YAML spec only allows spaces there. Tabs are allowed inside quoted strings and as separation elsewhere.
Does this validate against a Kubernetes or GitHub Actions schema?
It validates YAML syntax and structure. For schema rules, convert to JSON and use the JSON Schema Validator with the schema you need.