YAML Cross-Runtime Preflight

Paste a YAML document — a GitHub Actions workflow, a Docker Compose file, a Kubernetes manifest, or plain YAML for a generic library — and see which structural features and ambiguous values would behave differently depending on which tool reads it. This tool builds directly on the YAML Semantic Difference Checker: it reuses that tool's YAML 1.1 vs 1.2 scalar-ambiguity detection wholesale (the 'Norway problem' and its relatives) and adds a broader set of structural checks that matter specifically to real YAML consumers — anchors/aliases, merge keys, tab indentation, duplicate keys and flow-style usage.

Processed locally in your browser. Your file is never uploaded.

How to use this calculator

  1. Paste your YAML, or upload a .yaml/.yml file — nothing leaves your browser.
  2. Select "Check YAML".
  3. Review each flagged issue: which runtimes/tools it affects and why.
  4. Use the suggested portable rewrite (tabs converted to spaces, ambiguous scalars quoted) where offered — some issues (anchors, merge keys, duplicate keys) are flagged only, since a safe automatic fix isn't possible without risking a structural change you didn't ask for.

Assumptions

Methodology

The document is analyzed in two layers. First, every plain scalar is resolved under both YAML 1.1 and YAML 1.2 Core Schema rules (identical logic to the YAML Semantic Difference Checker) — any disagreement is flagged and re-explained for its relevance to specific runtimes. Second, the document is scanned for structural features known to vary across real-world YAML consumers: anchor/alias usage (warning — some tools restrict or disable these to prevent recursive-expansion resource exhaustion), merge keys (error — a YAML 1.1 extension outside the YAML 1.2 spec, unsupported by Kubernetes and many strict parsers), tab-indentation (error — forbidden by the YAML spec itself), duplicate keys within one mapping (warning — the spec leaves this unspecified, and most parsers silently keep only the last occurrence), and flow-style collections inside an otherwise block-style document (info — a low-confidence hint, not a real problem).

Worked example

A GitHub Actions matrix value that looks like a flag

Inputs: flag: on

Result: Reuses Tool 1's Norway-problem detection: YAML 1.1 reads "on" as boolean true, YAML 1.2 reads it as the string "on". In a GitHub Actions matrix or env value, this is exactly the kind of value that was probably meant to stay a string.

A Docker Compose merge key

Inputs: <<: *defaults

Result: Flagged as an error: merge keys are a YAML 1.1 extension, not part of the YAML 1.2 spec, and unsupported by Kubernetes YAML processing and several strict parsers. No automatic rewrite is offered — resolve the referenced anchor's content manually if you need a portable version.

Tab-indented Kubernetes manifest

Inputs: \tname: demo

Result: Flagged as an error (tabs are forbidden by the YAML spec, not just discouraged) with a suggested rewrite converting each leading tab to 2 spaces.

Practical guidance
Common mistakes

FAQs

Why does this tool overlap with the YAML Semantic Difference Checker?

It doesn't duplicate it — it reuses it. Rule 1 here calls that tool's own scalar-resolution logic directly rather than re-solving the same problem, then adds structural checks (anchors, merge keys, tabs, duplicate keys, flow style) that the semantic checker deliberately leaves out of scope.

Why are merge keys an error but anchors/aliases only a warning?

Merge keys are outside the YAML 1.2 spec entirely and are concretely unsupported by name in tools like Kubernetes' YAML processing — a near-certain break. Anchors/aliases are valid, widely-supported core YAML that some tools merely restrict for security reasons, which is a real but less certain risk.

Why doesn't this tool auto-fix anchors, merge keys or duplicate keys?

Each of those requires understanding what the document actually means (what an anchor's expanded content is, which duplicate occurrence was intended) rather than a mechanical text change — the tool flags them and explains the manual fix instead of guessing.