How to use the JSON to YAML Converter tool
- Paste your JSON.
- Choose the indentation and whether to sort keys.
- Copy or download the YAML.
When you need it
APIs and command-line tools usually return JSON, while configuration files expect YAML. Typical cases: turning kubectl get -o json output into a manifest, converting an API response into an Ansible variable file, or translating a JSON example from documentation into a docker-compose.yml.
What the output looks like
- Strings are quoted only when necessary, for example when they look like numbers, booleans or contain special characters.
- Long strings are kept on one line so values are not changed by line wrapping.
- Sorting keys gives a stable output, which makes diffs in Git much cleaner.
Tip: Kubernetes ignores key order, but humans do not. Put apiVersion, kind and metadata first and leave “sort keys” off for manifests.
Privacy
Everything runs in your browser. Nothing you type is sent to our server or stored.
Frequently asked questions
Will the YAML parse back to the same JSON?
Yes. The conversion is lossless for data. Only formatting differs.
Why are some strings quoted?
To keep their type. Without quotes, "true" or "1.10" would become a boolean or a number in YAML.
Can I convert YAML back to JSON?
Yes, with the YAML to JSON converter.
Is there a size limit?
Only your browser’s memory. Several megabytes work fine.