FAQ
Are YAML anchors and aliases supported?
Not yet; they are treated as plain scalars. Expand anchors before converting.
What indentation does the output use?
Two spaces per the YAML spec. Tabs are invalid in YAML.
How is multi-line text handled?
Multi-line structure is preserved rather than flattened.
About this tool
JSON to YAML indents with 2 spaces (tabs are illegal in YAML), writes arrays of objects as - key: value followed by the remaining keys, and renders empty arrays as [] and empty objects as {}. Strings are quoted only when they contain special characters. That restraint is why YAML reads well, and also its trap: "true" and true, or "1.0" and 1.0, are different types in YAML, so quoted output is what stops a value from being read as a boolean or a number elsewhere.
The reverse direction uses a self-contained subset parser, not a full YAML implementation. Supported: block mappings, block sequences, indentation-based nesting, whole-line # comments, single- and double-quoted strings, and the --- / ... document markers. Not supported: anchors and aliases (&, *), merge keys <<, multi-line block scalars (|, >), flow style ({a: 1}, [1, 2]) and tags such as !!str.
Unsupported syntax degrades silently instead of raising an error, which is the part to watch: command: | parses as the string "|" and the whole indented block below it is skipped. Convert a Kubernetes or GitHub Actions snippet that uses | and you get incomplete JSON. Check the source for these constructs before trusting the result.
Type inference covers only null / ~, true / false, integers and decimals. yes, no, on, off (booleans in YAML 1.1) stay strings, as do 1e3 and dates — verify against the consuming tool's own behaviour. Trailing comments (key: value # note) are not stripped and become part of the value, so put comments on their own line.