About this tool
Turn JSON into readable YAML for configuration files and manifests. Strings that YAML would otherwise read as other types, such as "true" or "1", are quoted so their meaning doesn't change, and you can choose the indentation and sort keys.
How to use it
- Paste JSON or import a file.
- Choose indentation and key sorting.
- Copy or download the YAML.
Example
{"service":"api","debug":"false","ports":[8080,8443]}service: api debug: "false" ports: - 8080 - 8443
The string "false" stays quoted so it isn't read as a boolean.
Questions
- Is any data lost going from JSON to YAML?
- YAML can represent everything in JSON. The one exception is numbers too large for JavaScript, which are flagged with a warning, and duplicate keys, which are also flagged.
- Does it work for Kubernetes manifests?
- It produces standard YAML that Kubernetes can read. This tool checks syntax only, so it won't tell you if a manifest is valid for the Kubernetes API.
- Can I convert back?
- Yes. Use the YAML to JSON tool. Data round-trips cleanly, apart from key order if you chose to sort keys.