YAML Semantic Difference Checker

Paste a YAML document and see exactly which values would be read differently depending on whether the parser follows YAML 1.1 or YAML 1.2 tag-resolution rules — not a syntax validator, a semantics checker.

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 value: what it means under YAML 1.1, what it means under YAML 1.2, and why that matters.
  4. Use the suggested portable rewrite, or copy the whole corrected document, to remove the ambiguity.

Assumptions

Methodology

Each plain scalar value in the document is resolved independently under YAML 1.1's tag-resolution regular expressions and YAML 1.2's Core Schema regular expressions. If the two schemas disagree on the resulting type or value, that's flagged. A boolean/null disagreement is marked as likely to break something (it silently inverts truthy/falsy logic); a numeric or timestamp disagreement is marked as worth checking (the value or type changes, but less likely to flip a condition outright).

Worked example

The classic 'Norway problem'

Inputs: country: NO

Result: YAML 1.1 reads NO as boolean false. YAML 1.2 reads it as the string "NO". Flagged as likely to break, with a suggested fix of country: "NO".

A leading-zero number

Inputs: retries: 0123

Result: YAML 1.1 reads 0123 as octal (83). YAML 1.2 reads it as plain decimal (123) — the same text means two different numbers.

Practical guidance
Common mistakes

FAQs

Why does enabled: yes become true?

Under YAML 1.1's boolean word list, "yes" (in any capitalisation) resolves to true. YAML 1.2's Core Schema only recognises true/false as booleans, so under 1.2 the same text stays the string "yes".

What is the YAML Norway problem?

Norway's ISO country code, NO, is also one of YAML 1.1's recognised boolean words for false — so an unquoted country: NO silently becomes country: false under a YAML 1.1 parser.

Does quoting a value always make it safe?

Yes — a quoted scalar ("yes", 'NO') is treated as an explicit string under every YAML schema. This tool never flags an already-quoted value.