YAML Validator

Validate YAML syntax and structure for configuration files.

Check YAML for syntax errors before it breaks a deployment. Paste a config file (Docker Compose, Kubernetes, GitHub Actions, Ansible, OpenAPI and so on) and you'll either get a confirmation with the number of documents it contains, or the error with its line and column. Most YAML errors come from indentation, tabs, unclosed quotes and brackets, or a missing space after a colon. The check uses the open-source js-yaml parser in your browser, so secrets in config files stay private.

Common use cases

  • Check a GitHub Actions workflow before pushing it
  • Find the indentation error in a Kubernetes manifest
  • Validate a Docker Compose file
  • Check YAML front matter in a blog post

How to use

  1. Paste the YAML, or press Try an example.
  2. Read the result and the line and column of any error.
  3. Fix it and check again.

FAQ

Can YAML use tabs?

No. YAML indentation must use spaces. A tab at the start of a line is an error.

Does it check Kubernetes or Compose rules?

No. It checks that the YAML itself is valid, not that the keys are ones Kubernetes or Docker expect.

What are multiple documents?

A YAML file can hold several documents separated by ---, as Kubernetes manifests often do. Each one is checked.