JSON to YAML Converter - Convert JSON to YAML Online
Convert JSON to YAML
Paste JSON on the left and the YAML version appears on the right, ready
to copy into a Kubernetes manifest, Docker Compose file or CI workflow.
Objects become indented mappings, arrays become - lists,
and empty objects and arrays are written as {} and
[]. The conversion runs in your browser, so configs with
secrets or internal hostnames are not uploaded.
Example
{"service":"api","replicas":3,"country":"NO","backup_time":"12:30",
"debug":false,"ports":[80,443],"motd":"Line one\nLine two","limits":{}} becomes:
service: api
replicas: 3
country: "NO"
backup_time: "12:30"
debug: false
ports:
- 80
- 443
motd: |-
Line one
Line two
limits: {} "NO" and "12:30" are quoted because a YAML
1.1 parser would read them as false and
750. This is the "Norway problem", and it has broken real
configs: country lists, version strings and cron-like times are the
usual victims.
Things YAML Adds That JSON Lacks
Once converted you can add comments (# like this), which
JSON does not allow, and use anchors (&defaults) and
aliases (*defaults) to reuse a block instead of repeating
it. The converter does not create anchors for repeated data; it writes
every value out in full. To check that a hand-edited YAML file still
means what you think, paste it into the
YAML to JSON converter and look at the
result.
Related Tools
JSON to XML Converter
Transform JSON objects and arrays into well-formed XML documents.
JSON to CSV Converter
Flatten JSON arrays into downloadable CSV spreadsheets in one click.
YAML to JSON Converter
Convert YAML configuration files to JSON format instantly.
XML to JSON Converter
Parse XML documents and convert them to JSON objects.