Skip to content

YAML Validator

Find YAML syntax errors — indentation, tabs, duplicate keys — with the exact line.

YAML input

Tab inserts indentation. Press Escape, then Tab, to move focus out of the editor.

Validation result

Invalid YAML

How to validate YAML

  1. Paste YAML on the left, or open or drop a .yaml or .yml file.
  2. The result appears as you type: Valid YAML, or the error with its line and column, highlighted in the editor.
  3. Review warnings about values that different YAML parsers read differently.

Catch YAML mistakes before your pipeline does

A single space too many can turn a list item into something else entirely, and CI systems often report it as a vague parse failure. The YAML validator uses a full YAML 1.2 parser to pinpoint the problem: bad indentation, tab characters, missing colons, unclosed quotes or brackets, and duplicate keys.

Invalid: one list item is indented by an extra space
steps:
  - run: npm ci
   - run: npm test

It also warns about yes, no, on and off, which YAML 1.1 tools read as booleans but YAML 1.2 treats as strings — a classic source of “works on my machine” bugs.

Use cases

  • Check GitHub Actions and GitLab CI workflows before pushing.
  • Validate Kubernetes manifests, Helm values and Docker Compose files.
  • Debug Ansible playbooks, OpenAPI specs and app configuration.

Related tools

Once it's valid, tidy the file with the YAML formatter or convert it with YAML to JSON. For other formats, use the JSON validator or the XML validator.

Frequently asked questions

What errors does the YAML validator find?
Syntax errors such as wrong indentation, tabs used for indentation, missing colons, unclosed quotes or brackets, and duplicate keys in the same mapping — each with the line and column.
Why does it warn about yes and no?
In YAML 1.1 (used by PyYAML and older tools) yes, no, on and off are booleans. In YAML 1.2 they are plain strings. The validator warns so you can write true/false or quote the value and get the same result everywhere.
Can I validate Kubernetes, Docker Compose or GitHub Actions files?
Yes, for YAML syntax. The validator doesn't check the specific schema of those tools (for example required Kubernetes fields), but it catches the syntax errors that make them fail to load.
Why aren't tabs allowed?
The YAML specification forbids tabs for indentation because their width is ambiguous. Use spaces.