Seeing YAML the way a parser does
YAML is easy to read and easy to get subtly wrong, because so much is implied: structure by indentation, types by how a value looks. Converting to JSON makes all of it explicit. Every string gets quotes, every list gets brackets, every level of nesting gets braces — and a mistake that was invisible in the YAML is obvious in the JSON.
That makes this converter a debugging tool as much as a format changer. When Kubernetes says "expected string, got bool" or a pipeline ignores a setting, paste the file here and look at the type and position the value really has.
Indentation errors
A key indented one space too far becomes a child of the previous key; one too few and it leaves the block. In JSON the wrong nesting is plain to see.
Numbers you meant as strings
version: 1.10 is the number 1.1. Zip codes, version numbers and ids need quotes: "1.10".
Ports and times
Always quote "80:80" and "12:30". Older YAML parsers read colon-separated digits as base-60 numbers.
Tabs
YAML forbids tabs for indentation. The converter reports the line instead of producing a confusing result.
What is supported
Block and flow mappings and sequences, plain and quoted scalars, literal (|) and folded (>) multi-line strings, comments, and the usual scalar types. This converter follows YAML 1.2 for booleans: only true and false are booleans, so yes, no, on and off stay strings — if your tool still uses YAML 1.1 rules, quote them to be safe. Anchors, aliases and custom tags are not supported and are reported as an error rather than silently dropped. Only the first document of a multi-document file is read.
Frequently asked questions
How do I validate a YAML file?
Paste it here. If it converts, the syntax is valid and the JSON shows the exact structure a parser sees. If not, the error message names the line where parsing stopped.
Why did "no" or "yes" turn into a boolean in my application?
YAML 1.1 parsers, still used by many tools, treat yes, no, on and off as booleans. Quote such values ("no") to keep them as strings everywhere. This converter uses YAML 1.2 rules and keeps them as strings.
Can JSON represent everything YAML can?
The data, yes. Comments, anchors and the choice between block and flow style are lost, since JSON has no way to express them.
Are multi-document YAML files supported?
Only the first document is converted. Split a file at its --- separators and convert each part separately.