What is the JSON to YAML?
YAML is easier to read and edit than JSON, which is why Kubernetes manifests, Docker Compose files, GitHub Actions, Ansible playbooks and OpenAPI specs use it. This converter turns any JSON into tidy, block-style YAML in one step.
It quotes strings that could otherwise change meaning, such as yes, no, on, off, 0o17 or 2026-10-02, so the YAML reads back as exactly the same data in both YAML 1.1 readers (PyYAML, older Kubernetes tooling) and YAML 1.2 readers.
How to use it
- Paste JSON, upload a .json file, or click Example.
- Pick 2 or 4 spaces and whether to sort keys.
- The YAML appears as you type.
- Copy it or download a .yaml file.
Example
{"service":"web","replicas":2,"ports":[80,443],"debug":"no"}service: web replicas: 2 ports: - 80 - 443 debug: "no"
Features
- Safe quoting. Strings like yes, no, on, off, null, dates and octal-looking numbers are quoted so no tool misreads them.
- Exact numbers. Large integers such as IDs are written exactly, never rounded.
- Readable output. Block style with no line folding, ready to paste into config files.
- Sort keys. Optional alphabetical keys at every level for stable diffs.
- JSONC input. Optionally accepts JSON with comments and trailing commas.
- Private. Conversion runs in your browser; configs and secrets are never uploaded.
Frequently asked questions
Why are some strings in quotes?
In YAML, an unquoted yes, no, on or off can be read as true or false, 2026-10-02 as a date, and 0o17 as the number 15. Quoting these keeps them as text in every YAML tool.
Is YAML a superset of JSON?
Mostly. YAML 1.2 accepts almost any JSON as-is, but block-style YAML like this output is much easier for people to read and edit.
Will comments be kept?
JSON has no comments, so there are none to keep. If you allow comments in the input, they are removed during conversion.
Can I convert YAML back to JSON?
Yes. Use YAML to JSON, or click “Convert back to JSON” under the output.
Is my data uploaded?
No. Everything happens in your browser.
Last updated · Free, no sign-up, runs in your browser.