YAML Validator
Validate YAML syntax with js-yaml: bad indentation, duplicate keys and unclosed brackets are reported with line and column. Supports multi-document files.
Runs entirely in your browser. Your data is never uploaded.
Related Tools
View AllWhat is YAML Validator?
The YAML Validator checks whether text is valid YAML and reports the first error with its line, column and reason, such as bad indentation, a duplicated mapping key or an unclosed flow sequence. Multi-document files separated by --- are supported.
How to use YAML Validator
- Paste YAML into the input box.
- Click Validate (results update as you type).
- Fix the error at the reported line and column, if any.
- A valid result shows how many documents were parsed.
Example
a: 1 a: 2
Line 2, column 1 – Syntax error: duplicated mapping key
When to use YAML Validator
Use it when CI fails with a YAML error, before applying Kubernetes manifests, or to check config files. It checks syntax only, not whether keys are correct for a specific tool (for example a valid GitHub Actions workflow).
How YAML Validator works
The text is parsed with js-yaml's loadAll using the default YAML 1.2 core schema. Every document is fully loaded, so indentation errors, duplicate keys, invalid escapes and unclosed brackets are detected. js-yaml reports a zero-based mark that is shown as a one-based line and column.
Common Use Cases
- Debugging "mapping values are not allowed here" errors
- Checking Kubernetes manifests before kubectl apply
- Validating docker-compose.yml and CI files
- Detecting duplicate keys that silently override settings
Security Note
Everything runs locally in your browser; the code you paste is not uploaded.
FAQs
Does it validate Kubernetes or GitHub Actions schemas?
No, only YAML syntax.
Are multiple documents supported?
Yes, documents separated by --- are all checked and counted.
Are anchors and aliases supported?
Yes.