Converters
JSON to YAML and YAML to JSON Converter
Convert JSON to clean YAML and YAML back to JSON, with indentation, key sorting, and multi-document support.
Runs locally in your browser — your input is not uploaded.
What is this tool?
YAML is the format behind Kubernetes manifests, Docker Compose, GitHub Actions, and many config files, while APIs speak JSON. Paste either one to convert as you type, with errors pointing to the exact line and column. Multi-document YAML (separated by ---) becomes a JSON array.
Conversion uses a full YAML 1.2 parser, including anchors and aliases, block scalars, and multiple documents. Comments are dropped when converting to JSON because JSON has no comment syntax.
Everything runs in your browser, so configuration files and secrets never leave your device.
How to use the JSON to YAML Converter
- Choose JSON → YAML or YAML → JSON.
- Paste your data, drop in a file, or load the example.
- Pick 2 or 4 spaces of indentation, and optionally sort keys, quote strings, or minify the JSON.
- Copy or download the result, or swap direction to convert it back.
Examples
JSON to YAML
{"name":"api","ports":[80,443]}name: api ports: - 80 - 443
Frequently asked questions
Is YAML a superset of JSON?
Yes — YAML 1.2 accepts any valid JSON, so you can paste JSON into YAML files. Converting gives you the cleaner indented style.
Why are my YAML comments missing in the JSON?
JSON has no comments, so they can't be carried over. Keep the original YAML if you need them.
What does “Quote all strings” do?
It wraps every string value in double quotes. That avoids surprises like yes, no, or on being read as booleans by older YAML 1.1 tools.
Can it convert files with several YAML documents?
Yes. Documents separated by --- become items in a JSON array, in the same order.
Want more power later?
Premium tools, higher limits, and API access are on the roadmap. V1 stays free and private in your browser.