Why use JSON to YAML?
- Converts all JSON types — objects, arrays, strings, numbers, booleans and null
- Configurable line-wrap width: 80, 120 chars, or no wrapping at all
- Uses js-yaml's dump for spec-compliant, idiomatic YAML output
- Entirely free and private — no uploads, no account, no limits
About JSON to YAML
JSON to YAML Converter takes any valid JSON — from a compact one-liner to a deeply nested object — and outputs properly indented YAML that is far easier for humans to read and edit. It's the go-to tool when you're setting up configuration files for tools like Helm, Ansible, GitHub Actions or any other system that prefers YAML over JSON.
Powered by the js-yaml library and running entirely in your browser, the converter handles all JSON data types including nested objects, arrays, numbers, booleans and null values. Adjust the line-wrap width to control how long scalar strings are allowed to get before they fold onto a new line. Your JSON data is never sent to a server, keeping it completely private.
How to use JSON to YAML
- 1
Paste your JSON
Paste any valid JSON into the left text area. It can be an object, an array, or any other valid JSON value.
- 2
Set line-wrap width
Choose a maximum line width from the dropdown (80 for compact YAML, 120 for more readable, or None to disable wrapping).
- 3
Convert and copy
Click Convert to YAML to see the result in the right pane, then click Copy to grab it for your config file or clipboard.
Frequently asked questions
Will the YAML output be valid?
Yes. js-yaml's dump function produces spec-compliant YAML 1.2 that can be loaded by any standard YAML parser without modification.
How does it handle JSON arrays?
Arrays are converted to YAML sequences using the dash-item (- value) list syntax, nested correctly according to depth.
What does the line-width setting do?
It sets the maximum number of characters on a single line before js-yaml wraps long strings. Set it to "No wrap" if you want every scalar on one line regardless of length.
Can I convert JSON to YAML for Kubernetes or Helm?
Absolutely. The output follows standard YAML conventions and works directly with Kubernetes manifests, Helm values files and similar tools.
Is my JSON data safe?
Yes. Everything runs locally in your browser using JavaScript — your JSON never leaves your device and is not stored anywhere.
How do I convert YAML back to JSON?
Use the companion YAML to JSON tool, also available for free on this site.
Related file & data convert
Browse more free tools
Explore every category in our toolbox.