YAML Validator

Find YAML mistakes by line and column before they break your config.

Runs in your browser
YAML
Drop file to load it
EmptySaved locally
Result
Ready
More options (2)
Try an example:

How to use the YAML Validator

  1. Paste your YAML or open a .yaml or .yml file.
  2. Errors are shown with the line and column, plus a snippet of the problem area.
  3. When the YAML is valid, see it cleaned up, as JSON, or as a short summary.
  4. Copy or download the result.

Examples

About this tool

YAML runs a large share of modern infrastructure: Docker Compose files, Kubernetes manifests, CI pipelines, Ansible playbooks and countless app configs. Its reliance on indentation makes it pleasant to read and easy to break. One extra space, a tab character or a missing colon can stop a deployment with a cryptic message.

This validator parses every document in the file and reports the first problem with its line and column, a plain-English explanation and a snippet showing where it happened. It catches tabs used for indentation, which YAML forbids, and keys that appear twice in the same block, which some tools silently accept by keeping the last value.

When the file is valid you can see how the parser understood it, which is the best way to spot subtle surprises: values such as no, on or 08 can be read differently from what you meant, and seeing the data as JSON makes the types obvious. Comments are not kept in the cleaned output, so keep your original file.

This tool runs entirely in your browser. What you type or open is never sent to a server.

Frequently asked questions

Why does YAML not allow tabs?

The YAML specification forbids tabs for indentation because their width varies between editors, which would make the structure ambiguous. Use spaces, typically two per level.

What does "duplicated mapping key" mean?

The same key appears twice at the same level, for example two lines starting with port: under one heading. Only one can survive, so remove or rename the other.

Does it check Kubernetes or Compose rules?

It checks YAML syntax, not whether the fields are right for a particular tool. A file can be valid YAML and still have a misspelled field name for Kubernetes.

Is my YAML uploaded?

No. Validation runs in your browser, so configs containing hostnames, keys or passwords never leave your computer.