Many systems export JSON but expect YAML back: Kubernetes, Helm, GitHub Actions, Ansible. Converting by hand invites indentation mistakes. A converter produces block-style YAML and quotes only the values that would otherwise change type.
What you'll learn
- Produce readable block-style YAML from any JSON
- Understand why some strings come out quoted
- Keep nested arrays and objects correctly indented
Step by step
-
Paste the JSON
Open JSON to YAML and paste the document. Output updates as you type.
-
Review the YAML
Objects become mappings, arrays become dash lists. Two-space indentation is used throughout.
{"name":"Ada","roles":["admin","y"]} → name: Ada roles: - admin - 'y' -
Notice the quoted values
A bare y would be read back as the boolean true by YAML 1.1 parsers, so it is quoted. The same applies to yes, no, on, off, null and numeric-looking strings.
-
Copy into your file
Paste the result under the right key in your manifest or values file, keeping the surrounding indentation consistent.
Common problems
Why is "y" quoted but "admin" is not?
Because y, n, yes, no, on and off are booleans in YAML 1.1. Quoting preserves them as strings.
Multi-line strings look odd
Strings containing newlines are emitted with a block scalar (|) or escapes. Both are valid; the block form is easier to read.
FAQ
Is the output valid for Kubernetes?
Structurally yes. Whether the fields are correct is a separate question; run the result through the Kubernetes YAML Validator.