Reformat YAML through a real parser, with a warning wherever a value would be read differently by YAML 1.1 — the Norway problem, versions, port mappings.
Waiting for YAML
Parsed under YAML 1.2, with a warning wherever YAML 1.1 would have read it differently.
The formatted YAML appears here
Reformatted through a real parser, with every ambiguous value flagged.
YAML Formatter runs entirely on your device — nothing is uploaded.
You’re on the Free plan. Compare plans
YAML has a handful of rules that silently turn one value into another, and a formatter that reformats without mentioning them has made the file prettier and no safer. This one parses properly and reports what is ambiguous.
The famous one is the Norway problem. YAML 1.1 resolved `yes`, `no`, `on` and `off` to booleans; YAML 1.2 does not, but plenty of parsers still do — which is how the country code `NO` became `false` in enough configuration files to earn the bug a name. A file that is correct under one parser is wrong under the other, with no error either way.
Version numbers are the second. Unquoted `1.10` is the float 1.1, and the trailing zero is gone before anything downstream sees it. The third is sexagesimal: under 1.1, `22:22` is the integer 1342, which is why every Docker Compose guide tells you to quote port mappings.
This parser follows YAML 1.2 and warns where 1.1 would have disagreed, because the file may well be read by a 1.1 parser later — Compose and several Go tools still resolve the old way.
Reformatting is lossy and the page says so. Comments, anchors and the original quoting style do not survive a parse-and-rewrite. For a file you intend to keep and read, that is a real cost; the tool is most useful for finding out what a file actually says.
YAML 1.1 resolves `no` to the boolean false, so a list of country codes containing NO silently becomes a list containing false. YAML 1.2 removed that rule, but not every parser follows 1.2. Quoting the value removes the ambiguity entirely.
Because unquoted `1.10` is a float, and the float 1.10 is 1.1. The trailing zero is gone before your program sees it, which matters a great deal when the value is a version.
No. YAML forbids tabs for indentation outright — it is one of the few things that is an outright syntax error rather than a surprising interpretation. Editors that insert tabs are a common source of files that will not parse.
No. Reformatting parses the document and writes it back out, and comments are not part of the parsed document. If the comments matter, use this to check the file rather than to rewrite it.
1.2, which is what the specification says and what most modern parsers do. Where 1.1 would differ, you get a warning rather than a silent difference — because the file may be read by a 1.1 parser later.