How to Validate YAML Online
"Validating" YAML sounds like it should be a single, simple check, but there are actually two different things people usually mean by it, and it's worth knowing which one you need.
Syntax validation vs schema validation
Syntax validation checks whether the YAML is well-formed at all — correct indentation, no stray characters, keys and values matching up properly. This is what a general-purpose tool like ours does: it tries to parse your file the same way any program would, and reports exactly where it fails if it can't.
Schema validation goes further and checks whether the content makes sense for a specific tool — for example, whether a Kubernetes manifest has all the fields Kubernetes actually requires for a Deployment. That kind of check needs to know the specific rules of Kubernetes, GitHub Actions, or whichever tool the file is for, so a general YAML validator can't do it; you'd use something tool-specific, like kubectl apply --dry-run for Kubernetes, or GitHub's own workflow linter.
What a good online validator should tell you
- Whether the file parses at all.
- The exact line and column of the first problem, if it doesn't.
- A plain-English reason, not just "syntax error."
- Ideally, the parsed structure so you can sanity-check it matches what you intended.
Is it safe to paste real config files into an online tool?
This is a fair question to ask before pasting a production config anywhere. The honest answer: it depends entirely on whether the tool sends your data to a server. Ours doesn't — the validator on this page runs entirely in your browser's JavaScript engine, so nothing you paste is ever transmitted. That said, as a general habit, it's still smart to swap out real passwords or tokens with placeholder values before pasting any config anywhere, just in case.
Once your file validates cleanly, running it through Format as well is worth doing too — a file can be technically valid and still have inconsistent indentation that makes it harder to review in a pull request.