Convert JSON input into YAML from the shell.
Section: Conversion and interoperability
Convert JSON to YAML with yq
bash
bash
yq -P -p=json '.' config.jsonExplanation
Useful in scripts and format conversion pipelines.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Conversion and interoperability
Convert JSON to YAML with Python
Transform JSON into YAML output for config workflows.
Convert Compose to resolved output
Render final service configuration from a YAML Compose file.
Build layered Kubernetes YAML
Generate final Kubernetes YAML from base and overlays.