JSON to YAML
Convert JSON to YAML format. Recursively traverses JSON objects to generate indented YAML — all in your browser, no upload, instant results.
About the JSON to YAML Converter
This JSON to YAML converter runs entirely in your browser. Paste JSON into the box above and click Convert. The result appears as indented YAML. Nothing is uploaded to a server — the conversion happens instantly with JavaScript on your device.
About the YAML format
YAML (YAML Ain't Markup Language) is a human-friendly data serialization format. It uses indentation to express nesting, dashes for list items, and key: value pairs for mapping entries. It is widely used for configuration files because of its readability.
Conversion rules
- Objects — JSON objects become YAML mappings with
key: valuepairs. - Arrays — JSON arrays become YAML sequences with
-item markers. - Strings — Strings that look like numbers, booleans, or null, or that contain special characters, are quoted for safety.
- Numbers and booleans — Emitted as plain scalars without quotes.
- Null — Emitted as
null. - Empty collections — Empty objects and arrays use the flow forms
{}and[].
Common use cases
- Generating configuration files from JSON data.
- Producing human-readable YAML from API responses.
- Migrating JSON-based settings to YAML tools.
- Quick inspection of JSON structures in YAML form.
Frequently asked questions
Does this tool upload my JSON? No. All conversion happens locally in your browser. Your data never leaves your device.
Why are some strings quoted? Strings that could be confused with numbers, booleans, or null are quoted to preserve their original meaning in YAML.
Is the input order preserved? Yes. Object key order in the output matches the order in your JSON input.
Is there a size limit? The only limit is your browser's available memory. Even large JSON files convert quickly.