Skip to main content
KalkuNet

YAML Validator — Check YAML 1.2 Syntax, Indentation, Duplicate Keys and YAML 1.1 Traps

Check YAML indentation spacing, tabs traps & structural consistency offline.

Runs in your browserDeveloper · JSON, YAML, TOML, XML & CSV Converters

✓ Valid YAML 1.2: 1 documents, 8 mappings, 2 lists, 26 scalars, 0 anchors, 0 aliases, depth 5

5 values are read differently by YAML 1.1 (PyYAML, Ansible, older tools). Quote them if the file is also read by such tools.

LinePathValueYAML 1.2YAML 1.1 (PyYAML)
2$.ononstring "on"true
7$.env.DEBUGnostring "no"false
8$.env.FILE_MODE0644int 644int 420
9$.env.WINDOW1:30string "1:30"int 90
10$.env.RELEASE2026-11-23string "2026-11-23"timestamp
  • Syntax is checked against YAML 1.2.2 (a parser that passes the whole official yaml-test-suite); YAML 1.2 also requires every key of a mapping to be unique. Application schemas such as Kubernetes are not checked.

When to use the YAML Syntax & Indentation Validator

  • The exact error location

    Syntax errors show the line, the column and a ^ under the character at fault, with an explanation such as a tab in the indentation, an unclosed quote or a : inside a value.

  • Tested with the yaml-test-suite

    The parser passes all 402 official cases: 308 valid documents produce exactly the expected events, and all 94 broken documents are rejected.

  • YAML 1.1 traps

    Values such as no, on, 0644, 1:30 or dates are read differently by PyYAML, Ansible and other YAML 1.1 tools (the country code NO becoming false, for instance). The validator shows the 1.2 and 1.1 readings side by side, and the list is checked against PyYAML.

  • Duplicate keys and statistics

    YAML 1.2 requires unique keys within a mapping, so duplicate keys are marked with their location. The summary counts documents, mappings, lists, scalars, anchors, aliases and depth.

Frequently asked questions

Will YAML that is valid here always be accepted by Kubernetes?

Its syntax, yes, but the Kubernetes schema is not checked. Misnamed fields still need a check with kubectl and the --dry-run=server option.

Why are tabs rejected?

YAML accepts only spaces as indentation. A tab may separate values within a line, but it cannot set the structure at the start of a line.

What is the << merge key?

A YAML 1.1 feature that copies another mapping. It is not part of YAML 1.2, but Docker Compose and GitLab CI use it widely; keep the option on so << is not treated as an ordinary key.

Is my file uploaded?

No. The check runs in your browser.

Learn more