JSON to YAML Converter
Paste JSON and get tidy, correctly quoted YAML. Nested objects, arrays, multi-line strings and special values are all handled.
How to convert JSON to YAML
- Paste your JSON into the left box.
- Choose the indentation and, optionally, sort keys or quote every string.
- Copy the YAML or download it as data.yaml.
Features
Correct quoting
Strings that look like numbers, booleans or null are quoted.
Multi-line strings
Written as readable block scalars.
Sort keys
Alphabetise for consistent diffs.
Private
Everything runs in your browser; nothing you paste is uploaded.
Frequently asked questions
What is the difference between JSON and YAML?
YAML is a human-friendly superset of JSON that uses indentation instead of braces and quotes, and allows comments. It is common for configuration files such as Docker Compose, Kubernetes and GitHub Actions.
Why are some of my strings quoted?
YAML would interpret unquoted values like true, null, 123 or text containing “: ” as other types or syntax. The converter quotes those strings so their meaning is preserved when parsed back.
How are multi-line strings handled?
Strings containing line breaks are written as literal block scalars (|), keeping each line readable. A |- block means there is no trailing newline.
Can I convert YAML back to JSON?
This tool converts JSON to YAML. Every valid JSON document is also valid YAML, so most YAML parsers can already read the JSON directly.