8 tools

YAML Tools and Converters

YAML exists to be written and read by people. It has comments, it needs no brackets or quotes for ordinary values, and indentation carries the structure, which is why it became the default for Kubernetes manifests, CI pipelines and application configuration.

YAML 1.2 was designed as a superset of JSON, but format compatibility is not a promise of a byte-for-byte round trip. These converters parse one YAML document at a time: a stream containing several documents must be split before conversion. Syntax errors are reported during conversion; there is no standalone YAML validator here. Comments and anchor notation are not retained in the JSON result.

Its flexibility is where the surprises live. Anchors and aliases let a document reuse a block, and merge keys let one mapping inherit another. Both useful, both invisible after conversion because the result is expanded. Older YAML versions also treated unquoted yes, no, on and off as booleans, which is why a country code of NO sometimes becomes false.

Working with YAML

Practical guides for the tools above, including the checks to make before relying on the result.

  • How to convert JSON to YAML

    Convert JSON to YAML: review quoting, indentation, multiline values, parser-version differences and the limits of a parse-and-serialize round trip.

  • How to convert YAML to JSON

    Convert YAML to JSON with the actual parser rules: YAML 1.2 defaults, configured merge expansion, duplicate and multi-document rejection, and directives.