YAML validator

Paste YAML to check that its syntax is correct. The YAML validator reports the structure it found, or the line and column of the first error, including duplicate keys in a mapping.

  • Free
  • No sign-up
  • Runs in your browser

Runs in your browser — your text is never sent to our servers.

How to use YAML Validator

  1. Paste your YAML into the Input box, or click Open a file to load a .yaml or .yml file.
  2. Read the sentence under Result. A valid file is described by its structure, for example a mapping with 3 keys and its nesting depth.
  3. If the YAML is invalid, the red message gives the line, the column and the reason. Fix that spot and the result updates as you type.

Features

  • Checks YAML 1.2 syntax as you type
  • Describes valid YAML as a mapping, a list or a single value, with its size and nesting depth
  • Reports line, column and reason for the first syntax error
  • Treats duplicate keys in a mapping as errors
  • Handles files with several documents separated by ---
  • Runs in your browser, so the YAML is never uploaded

Supported formats and limits

  • Maximum input: 10,000,000 characters

Examples

InputResult
name: OneVixa tools: - json - yaml settings: free: true limit: null Valid YAML: a mapping with 3 keys, nesting depth 2.
a: 1 a: 2Invalid YAML at line 2, column 1: Map keys must be unique — The repeated key a makes the document invalid.
--- a: 1 --- b: 2Valid YAML: 2 documents; the first is a mapping with 1 key, nesting depth 1.

Limitations

  • The validator checks YAML syntax only. It does not check a schema such as Kubernetes, Docker Compose or GitHub Actions.
  • Only the first error is reported, so a file with several problems may need a few rounds of fixing.
  • For a file with several documents, the result describes the first document.
  • Very large files can be slow to process in the browser.

Learn more

Valid YAML has two layers. The first is syntax: indentation that defines nesting, a colon and a space between a key and its value, dashes for list items, and balanced quotes and brackets. A syntax checker like this one answers whether a parser can read the file at all.

The second layer is meaning. A Kubernetes manifest, a Compose file or a CI workflow can be perfectly valid YAML and still be rejected because a field is missing or misspelled. That is checked by a schema or by the program that consumes the file, not by a YAML validator.

Duplicate keys deserve attention. The YAML 1.2 specification says mapping keys must be unique, but some parsers quietly keep the last value. A repeated key is usually a copy-and-paste mistake, so it is treated as an error here. Indentation errors are the other common cause of failure, because YAML does not allow tab characters for indentation.

Frequently asked questions

What does the YAML validator check?

It checks that the text is valid YAML 1.2, meaning correct indentation, colons, lists, quotes and brackets, and that mapping keys are unique. It does not check that the content makes sense for a particular program.

Why are duplicate keys an error?

The YAML specification requires keys in a mapping to be unique. Different parsers handle a repeated key differently, so a duplicate is reported instead of being silently accepted.

Why does my YAML fail when it looks fine?

Often the cause is a tab used for indentation, a line indented by one space too many or too few, or a missing space after a colon. The line and column in the message show where the parser stopped.

Can it validate Kubernetes or Docker Compose files?

Not their structure. It confirms the YAML syntax is correct, and a schema-aware tool is needed to check the rules of those formats.

Is my YAML uploaded?

No. The check runs in your browser.

Sources

Last reviewed: September 30, 2026