YAML

YAML Validator

Checks that a YAML document parses, and names the line where it stopped making sense.

Loading the tool…

Processing happens locally in your browser. What you paste or load is processed by this page and is not uploaded to a server. Nothing is stored unless you use a control that says it stores something, and you can clear anything this site has kept from the privacy page.

How to use this tool

  1. Paste the configuration you want checked, or load a .yaml or .yml file.
  2. Select Check.
  3. If it fails, go to the reported line. Look first for a tab, then for a value containing a colon and a space, then for a line indented differently from its siblings.
  4. Fix that one problem and check again — a broken indent usually reports only the first place it went wrong.

What yaml validator does

Almost every YAML failure is an indentation failure, and almost every indentation failure comes from a tab. YAML forbids tabs for indentation outright, and because an editor may render a tab as exactly the width of the surrounding spaces the offending line looks identical to its neighbours. The second most common cause is a value containing a colon followed by a space, which YAML reads as a nested key.

This checker parses the document and, when it cannot, names the line it gave up on. It handles the block style that configuration files are actually written in — mappings, sequences, block scalars, comments, quoted and plain scalars, and inline flow collections. Anchors, aliases and custom tags are refused by name rather than guessed at, because a configuration file that loads wrongly is far worse than one that refuses to load.

Frequently asked questions

Look for a tab. YAML forbids tabs for indentation, and an editor that renders a tab as two spaces makes the offending line look identical to its neighbours. Turn on whitespace display, or retype the indentation of that line with spaces.

No. The document is parsed by JavaScript running in your browser and nothing leaves your machine. That matters here more than on most pages, because deployment and pipeline files often carry host names, bucket names and internal service names.

No — your file is valid YAML and this tool is declining to guess at it. Resolving an anchor means substituting a value defined elsewhere, and a subtly wrong substitution would produce a configuration that loads and does the wrong thing. Refusing is the safer answer. Expand the anchors and check the result.