YAML Validator: Lint YAML and List Every Error

Paste YAML or open a file to get every syntax error and lint warning at once, each with its line, column, and a code frame. It catches tabs, duplicate keys, the YAML 1.1 “Norway problem”, octal and base-60 surprises, undefined aliases, and alias bombs, and shows how each document resolves to JSON under YAML 1.2 and 1.1. Everything runs in this page; nothing is uploaded.

Ctrl+Enter (or Cmd+Enter) validates. You can also drop a file here. Files are read locally.

READY Paste YAML, open a file, or load a sample.
Errors
0
Warnings
0
Documents
0
Lines
0

Problems

Select a problem to highlight its location in the input. The arrow symbol in code frames marks a tab character.

    Nothing checked yet.

    Resolved values as JSON

    Interpret as
    Rules, severities, and limits

      How it works and its limits

      • A hand-written parser reads the whole stream: block and flow collections, plain, quoted, literal and folded scalars (with chomping and indentation indicators), anchors, aliases, merge keys, tags, %YAML and %TAG directives, comments, and documents separated by --- and ....
      • After a syntax error the parser skips to the next line it can make sense of and keeps going, so you see more than the first problem. Fix the first error first: later messages can be side effects of it.
      • YAML 1.1 vs 1.2. YAML 1.1 (PyYAML, Ruby Psych, go-yaml v2, many older tools) reads yes, no, on, off as booleans, 0755 as octal, 1:20 as base 60, and 2024-05-01 as a date. The YAML 1.2 core schema treats all of those as strings, except 0755, which becomes decimal 755. That is why country: NO can turn into false. The truthy, octal, and base-60 rules apply even under %YAML 1.2, because many 1.1 parsers ignore that directive.
      • The 1.1 preview follows the YAML 1.1 type repository, which includes y and n as booleans (PyYAML does not). Merge keys (<<) are applied in both previews. JSON cannot represent .inf or .nan, so they appear as the strings "Infinity" and "NaN". Timestamps appear as ISO strings, and integers beyond 253 keep their exact digits.
      • Duplicate keys are compared after YAML 1.2 resolution, so 16 and 0x10 count as the same key, but 1 and "1" do not.
      • Aliases are never expanded past the alias expansion limit, so a “billion laughs” file is reported instead of freezing the page.
      • Custom tags such as !Ref or !reference are accepted, and the value underneath is shown untagged. This tool does not check schemas: it will not tell you that a Kubernetes field name is misspelled. It also does not reformat YAML; use a formatter for that.
      • This parser has not been certified against the official YAML test suite. A few rare constructs, such as multi-line implicit keys inside flow collections or unusual flow indentation, may be accepted or rejected differently by your parser.
      • Your input stays in this page. Nothing is uploaded or saved, and reloading the page clears it.