What is YAML Validator?
This YAML validator parses your YAML the way a YAML library does and tells you exactly where it breaks. YAML is whitespace-sensitive and forbids tab characters for indentation, so a single tab, a mis-indented key or a duplicated key can stop a GitHub Actions workflow, a Kubernetes manifest or a docker-compose.yml from loading, often with an unhelpful error.
Paste your YAML and it is parsed as you type. Valid input gets a confirmation with the number of documents found; otherwise you see a plain-English message with the line number, such as "Tab character used for indentation", "Duplicate key \"image\" (first defined on line 4)" or "Unterminated quoted string".
How to use YAML Validator
- Paste your YAML into the input box.
- The check runs as you type; "Valid YAML" means the whole file parsed, and the document count shows how many --- separated documents it contains.
- If an error appears, go to the reported line number and read the message.
- Fix the indentation, key or quote it describes, and the result updates immediately.
Key features
- Full YAML 1.2 parsing, not just a line-by-line lint
- Exact line number and a plain-English message for every error
- Detects tabs, bad indentation, duplicate keys and unclosed quotes
- Supports anchors, aliases, merge keys, block scalars and multi-document files
- Runs in your browser; configuration secrets are never uploaded
Common use cases
- Checking GitHub Actions, GitLab CI and CircleCI workflow files
- Catching tab characters in Kubernetes manifests and Helm values files
- Validating docker-compose.yml before running docker compose up
- Reviewing Ansible playbooks and OpenAPI specifications
- Spotting copy-paste formatting problems in config files
Technical details & standards
The input is parsed by a YAML 1.2 parser that runs in your browser. It handles block mappings and lists, nested structures, flow collections ([a, b] and {k: v}), plain, single-quoted and double-quoted strings with escapes, literal (|) and folded (>) block scalars with chomping indicators, comments, anchors (&name), aliases (*name), merge keys (<<), tags such as !!str, and multiple documents separated by --- or ended by ....
It reports the errors that break real configuration files: tabs used for indentation, lines indented deeper than their structure allows, duplicate keys in the same mapping, list items in the wrong place, aliases used before their anchor, unclosed quotes and unclosed [ or {. Scalars resolve with the YAML 1.2 core schema, so yes, no, on and off stay strings, while true, false, null, numbers and .inf are typed. The check covers YAML syntax; it does not know the schema of a particular format, such as Kubernetes field names, so use kubectl --dry-run or docker compose config for that.
Frequently asked questions
Why are tabs not allowed in YAML?
The YAML specification uses indentation to express structure and only permits spaces for it, because tab widths vary between editors and would make nesting ambiguous. Configure your editor to insert spaces (usually 2) in .yml and .yaml files.
What is the most common YAML syntax error?
Inconsistent indentation, including tabs, followed by a missing space after the colon (key:value instead of key: value) and unquoted special characters, such as a value starting with * or containing ": ".
Why is a duplicate key an error?
The YAML specification requires keys in a mapping to be unique. Many parsers silently keep the last value, which hides mistakes such as two env: blocks in one workflow step, so this validator reports the duplicate together with the line of the first definition.
Does this validate my Kubernetes or Docker Compose schema?
No. It checks YAML syntax and structure, which is what fails first. Field names and types are defined by each platform: use kubectl apply --dry-run=client or kubeconform for Kubernetes and docker compose config for Compose files.
When should I quote strings in YAML?
Quote values that start with special characters (*, &, !, %, @, `), contain ": " or " #", or could be misread as another type, such as numbers with leading zeros (ZIP codes) or version numbers like 1.10. YAML 1.1 parsers, including older PyYAML versions, also read yes, no, on and off as booleans.
How do I validate a YAML file online?
Open the file, copy its contents, paste them into the validator and check the reported errors.
Is my data safe?
Processing happens locally in your browser. Tool input is not sent to CodeUnpack servers.
Does it work offline?
Once the page has loaded, this tool can process input without an internet connection.