JSON to YAML / YAML to JSON

Convert between JSON and YAML, in either direction. Handles nested objects, arrays, multi-line strings, booleans, and nulls. Useful when working with Kubernetes / GitHub Actions / OpenAPI specs.

Trade-offs between JSON and YAML

JSON is strict, unambiguous, and machine-friendly. YAML is human-friendly (less punctuation, supports comments) but has well-known surprises: the "Norway problem" (unquoted no becomes boolean false), version-strings-as-floats, indentation tabs vs spaces, and competing implementations with subtle behavioral differences.

For config that humans edit by hand, YAML is usually worth the quirks. For data interchange between services, JSON is safer. For API payloads, JSON every time.