Skip to content
cliplimeClipLime

Check your YAML syntax

Paste YAML and see if it parses. If not, you get the line, the column and what is likely wrong, with notes on values YAML versions read differently.

Your text is processed in this tab and never uploaded

Options

0 characters, 0 lines Your text stays in this tab.

Result

The result appears here.

This checks YAML syntax. It does not know your schema, so it cannot tell you that a Kubernetes or CI field is wrong.

At a glance

What it checks
YAML syntax: indentation, tabs, quotes, brackets, duplicate keys and aliases that point to no anchor.
Reports
Number of documents, top level type, size, lines, depth, and counts of mappings, keys, lists, values, anchors and aliases.
Version notes
Lists values that YAML 1.1 and 1.2 parsers read differently, such as yes, NO, 0755 and 1:30.
Errors
The line and column, the faulty line, a likely cause, and up to eight more problems after the first.
Multiple documents
Files with several documents separated by --- are checked document by document.
Not checked
Schemas. It cannot tell you that a GitHub Actions, Kubernetes or compose field is wrong.
Privacy
Runs in your browser tab. Your YAML is never uploaded.

How to do it

  1. 1

    Paste YAML or drop a file

    Paste into the left box or drop a .yaml or .yml file on it. The check runs as you type.

  2. 2

    Read the verdict

    A green card says Valid YAML and describes the file. A red card names the problem with its line and column.

  3. 3

    Fix the problems

    Press Go to line to jump to the first problem. Any further problems are listed under it.

  4. 4

    Read the notes

    Notes under a valid result point out values that different YAML versions read differently, so you can quote them if it matters.

What the validator checks

It reads the whole file with a YAML 1.2 parser and reports anything that stops it:

  • Tabs or inconsistent spaces used for indentation.
  • Brackets, braces and quotes that are never closed.
  • A key without a colon, or two colons on one line where a value was expected.
  • A value that starts with a character YAML reserves, such as @, a backtick or %.
  • Duplicate keys in one mapping.
  • Aliases (*name) that refer to an anchor (&name) that is not defined earlier in the same document.
  • Invalid escape sequences in double quoted text.

If there are several problems, the first is shown in full and up to eight more are listed with their line and column. Later problems are sometimes side effects of the first, so fix from the top.

Valid YAML that does not mean what you think

A file can be valid and still not say what you intended. The validator cannot see your intent, but it flags the cases YAML versions disagree on:

  • yes, no, on, off. YAML 1.1 parsers, such as PyYAML, read them as booleans. YAML 1.2 reads plain text. The country code NO for Norway turning into false is the classic example.
  • Numbers with a leading zero. 0755 is octal 493 in YAML 1.1 and decimal 755 in YAML 1.2.
  • Values like 22:22 or 1:30. YAML 1.1 reads them as base 60 numbers. Docker documents this for port mappings, and recommends quoting "HOST:CONTAINER" ports for that reason.
  • key:value with no space. It is valid, but it is a single text value, not a key with a value.

Quote a value ("NO", "0755") when you want text under every parser.

Syntax is not a schema

Files such as GitHub Actions workflows, Kubernetes manifests, docker compose files and OpenAPI documents are YAML, but each has its own rules about which keys exist and what values they take. This tool checks the YAML underneath and nothing about those rules, so a misspelled key such as enviroment passes.

Check the syntax here first, because a schema aware tool cannot start until the YAML parses. To tidy a file that already passes, use the YAML formatter.

Reading the report

Top level says whether each document is a mapping, a list or a single value. Values counts every text value, including keys. Anchors and Aliases count the &name and *name markers, which let one part of a file be reused in another. Nesting depth counts how many mappings and lists are open at the deepest point.

Questions people ask

Does this validate a Kubernetes manifest or a GitHub Actions workflow?

Only the YAML syntax. It does not know which fields those files allow, so a wrong key name or a wrong value type passes. Use a tool that knows the schema for that.

Is key:value without a space an error?

No. YAML reads key:value as one text value. The validator will say the file is valid, which is why a config can load and still not work. Write key: value.

Which YAML version does it use?

It reads YAML 1.2. Notes under the result tell you where a YAML 1.1 parser would read a value differently, because many tools still use 1.1 rules.

Why are duplicate keys an error?

The YAML specification says keys in a mapping must be unique. Parsers handle duplicates differently: many keep the last value, some keep the first and some refuse the file, so the result depends on the tool.

Can it check a file with several documents?

Yes. Documents separated by --- are checked one after another, and the report says how many there are. An alias can only refer to an anchor in its own document.

Is my YAML uploaded?

No. The YAML reader loads into your browser tab and runs there. Your text is never sent anywhere.