YAML Validator / Linter
Paste a Kubernetes manifest, GitHub Actions workflow, docker-compose file, or any YAML and get line-numbered errors with a caret pointing at the problem — tabs used for indentation, levels that don't line up, unclosed quotes, and duplicate keys. The parser runs entirely in your browser (your config never leaves the page) and shows the parsed structure as JSON, which exposes the most common silent bug: values that parsed as the wrong type, like a bare no becoming the boolean false.
Paste YAML (a Kubernetes manifest, GitHub Actions workflow, docker-compose file…) to check it. Validation runs locally as you type.
How to use the yaml validator / linter
- Paste your YAML into the box — validation runs locally as you type.
- Read errors top-down: the first error often cascades, so fix it and re-check before chasing the rest.
- When the document is valid, inspect the JSON panel and confirm every value has the type you intended (string vs number vs boolean).
- Anchors (&), aliases (*), and tags (!) get an honest 'not supported' warning rather than a false pass — verify those parts with your target tool.
The canonical YAML gotcha table
Most "invalid YAML" tickets are actually valid YAML that means something different from what the author intended. These are the classics, all stemming from YAML 1.1's aggressive type resolution (the spec generation that PyYAML, libyaml, and most infrastructure tooling still implement):
| You write | Parser sees | Fix |
|---|---|---|
| country: NO | boolean false — the famous Norway problem | country: "NO" |
| version: 1.30 | float 1.3 — Kubernetes 1.30 becomes 1.3 | version: "1.30" |
| mode: 0755 | octal integer 493 | mode: "0755" |
| time: 1:30 | sexagesimal integer 90 (1×60 + 30) | time: "1:30" |
| id: 089 | string (invalid octal digit 9) — while id: 088's sibling 087 is the number 71 | quote all IDs |
| a tab before a key | hard parse error | spaces only; set your editor to expand tabs for .yaml |
The blanket fix: quote any scalar that must stay a string. The JSON panel in this tool exists precisely so you can spot a false or 493 where you expected text.
Debugging Kubernetes and GitHub Actions YAML
A practical workflow when kubectl apply or the Actions runner rejects your file: first paste it here and clear the structural errors — tabs and misaligned indentation account for the majority. Second, check the JSON output for type surprises: GitHub Actions' on: trigger key is the single most famous victim (in YAML 1.1 the bare key on resolves to the boolean true, which is why some parsers show your workflow triggers under a true: key). Third, remember that indentation depth is per-document convention, not a fixed number — two spaces and four spaces are both fine, but siblings must match exactly, and a list under a key may sit either at the key's own indent (zero-indented style, common in Kubernetes) or deeper. Only after the YAML itself is clean do schema-level errors (wrong field names, missing required keys) become visible to kubectl --dry-run=server or actionlint.
Frequently asked questions
Why are tabs forbidden in YAML indentation?
The spec forbids them because a tab has no defined width — one editor shows 8 columns, another 2, and the parser cannot know which nesting level you meant. YAML's authors chose to reject ambiguity outright. Configure your editor to insert spaces for .yaml/.yml files; in VS Code that's "editor.insertSpaces": true plus "editor.detectIndentation": false for consistency.
What exactly is the Norway problem?
Under YAML 1.1 resolution rules, the unquoted scalars yes/no/on/off (in lower, Title, and UPPER case) parse as booleans. So a list of country codes containing NO — Norway — silently becomes false, and a config line like 'autoplay: off' is a boolean, not the string "off". YAML 1.2 dropped these aliases, keeping only true/false, but most deployed parsers (PyYAML, libyaml, and the tooling built on them) still speak 1.1. This validator resolves like 1.1 on purpose, so the JSON panel shows you what production will see.
Does this validator check Kubernetes or GitHub Actions schemas?
No — it validates YAML syntax and structure (indentation, quoting, duplicate keys, types), which is the layer where most failures happen. Whether 'replicaz: 3' is a misspelled field is a schema question; after the YAML is clean, run kubectl apply --dry-run=server, kubeconform, or actionlint for that layer.
Why does the tool flag duplicate keys when my parser accepts them?
Because silent acceptance is the dangerous part. The YAML spec requires mapping keys to be unique, but many parsers don't enforce it: PyYAML and Go's yaml.v3 quietly keep the last occurrence, so a duplicated 'env:' block makes the first one vanish without any warning. Treating duplicates as errors here catches copy-paste mistakes before they erase half your config in production.
Are anchors, aliases, and merge keys (&, *, <<) supported?
Not by this validator — they produce an explicit warning instead of a guess. An anchor that this tool faked its way through could pass here and still fail (or resolve differently) in your real parser, and a wrong 'valid' badge is worse than an honest 'unsupported'. docker-compose files lean on anchors heavily, so validate those with docker compose config, which both resolves anchors and applies the schema.
Is YAML a superset of JSON — can I paste JSON here?
Practically yes: every JSON document is valid YAML, and this tool parses single-line {…} and […] flow collections. The reverse is false — YAML adds indentation blocks, comments, anchors, and multi-document streams that JSON has no equivalent for. If you need the conversion itself, use our YAML to JSON converter, which round-trips both directions.
Related tools
- JSON Formatter & ValidatorFormat, validate, and beautify JSON in your browser — instant error messages with line numbers, 2 or 4-space indent, minify mode, and copy.
- SQL Formatter / BeautifierFormat and beautify SQL queries in your browser — keyword casing, clause indentation, and comma style for MySQL, Postgres, and standard SQL.
- JSON Escape / UnescapeEscape text for JSON strings or unescape JSON back to plain text — quotes, backslashes, newlines, and unicode handled correctly both ways.
- YAML ⇄ JSON ConverterConvert YAML to JSON and JSON to YAML instantly in your browser — multi-document support, error line numbers, and copy or download output.
- chmod Permissions CalculatorConvert Linux file permissions between octal and symbolic instantly — check rwx boxes to get chmod 755-style commands with clear explanations.
- .htpasswd GeneratorGenerate .htpasswd lines for Apache and nginx basic auth — bcrypt or MD5-crypt hashes computed locally, your password never touches a server.