JSON to YAML Converter
Turn JSON into clean, readable YAML for configuration files.
JSON input
Tab inserts indentation. Press Escape, then Tab, to move focus out of the editor.
YAML output
How to convert JSON to YAML
- Paste JSON on the left, or open or drop a .json file.
- The YAML appears on the right as you type.
- Choose 2- or 4-space indentation and whether every string should be quoted.
- Copy the YAML or download it as a .yaml file.
Readable YAML from JSON
YAML says the same thing as JSON with less punctuation, which is why config files, Kubernetes manifests and CI pipelines use it. The converter keeps your key order and data types and quotes only the strings that would otherwise be misread — like "yes", "1.0" or "off".
{"name": "web", "replicas": 3, "ports": [80, 443], "debug": false}name: web
replicas: 3
ports:
- 80
- 443
debug: falseUse cases
- Turn a JSON config into a YAML one for Kubernetes, Docker Compose or Helm.
- Convert an OpenAPI or Swagger spec from JSON to YAML.
- Make JSON data easier to read and comment in code reviews.
Related JSON and YAML tools
Convert back with YAML to JSON. Check your JSON first with the JSON validator, then tidy the resulting YAML with the YAML formatter or check it with the YAML validator. Need XML instead? Use JSON to XML.
Frequently asked questions
- Why are some strings quoted in the YAML?
- Values like "yes", "on", "1.0" or "010" would be read as booleans or numbers by many YAML parsers. The converter quotes them so they stay strings everywhere.
- Is the converted YAML valid for Kubernetes and Docker Compose?
- Yes. The output is standard YAML with 2-space indentation, which those tools accept. Converting keeps key order, so manifests stay readable.
- Can I convert YAML back to JSON?
- Yes, with the YAML to JSON converter. Converting JSON to YAML and back gives the same data.
- Are large numbers preserved?
- Yes. Integers beyond JavaScript's safe range (like 64-bit IDs) are written exactly, without rounding.