DataToolsLab
YAML Tools

YAML Type Coercion Checker

Find values that coerce to different types in YAML 1.1 vs 1.2.

Loading tool…

What is Coercion Check?

A safety scanner for the YAML 'Norway problem': tokens like yes, no, on, off, and leading-zero numbers parse differently under YAML 1.1 vs 1.2 schemas.

How it works

Each candidate token is probed with js-yaml under both CORE (1.2) and YAML 1.1 schemas; differing results are flagged with a fix suggestion.

  1. Enter your input. Type or paste your input into the field above — the tool responds instantly.
  2. Review the result. Output updates live as you type. Everything runs entirely in your browser.
  3. Copy or download. Use the Copy button to grab the result, or Download to save it as a file.

Examples

Catching type surprises

Find every value YAML auto-converts — 1.0 becomes a float, 007 becomes 7, yes becomes a boolean — before it silently breaks a config.

Common mistakes

Unquoted string gotchas

Version numbers, IDs, and yes/no values are the classic coercion traps. The checker lists each one with its inferred type.

Frequently asked questions

How does YAML resolve types?

Unquoted scalars are matched against null, bool, int, and float patterns before falling back to string.

How do I prevent coercion?

Quote the value — the checker shows which strings need quotes.

Online