# JSON to YAML

> Convert JSON to YAML, or YAML back to JSON, in this tab. Indent and sort keys are optional. Nothing is uploaded.

URL: https://tools.cuelark.com/json-to-yaml
Publisher: Cuelark Team (https://cuelark.com)
Updated: 2026-11-28
Price: free, no sign-up
Privacy: runs in the browser; files are not uploaded

Paste JSON and download YAML, or paste YAML and download JSON. You can choose a 2- or 4-space indent and sort object keys. The conversion uses YAML 1.2 and runs in this tab, so the text is never uploaded. This is not the JSON to CSV page, and there was no YAML tool on this site before this page.

## How to use it

1. Choose JSON to YAML or YAML to JSON. Paste text, drop a file, or try the sample order.
2. For JSON to YAML, pick a 2- or 4-space indent. Turn on Sort keys if you want maps in alphabetical order.
3. For YAML to JSON, leave Pretty-print JSON on unless you want a single line.
4. Copy the result or download a .yaml or .json file.

## Details

- **YAML 1.2:** Conversion uses the yaml package’s YAML 1.2 parser and emitter. Duplicate keys are rejected
- **JSON:** Any JSON value is accepted: objects, arrays, strings, numbers, true, false and null
- **Keys:** Sort keys only changes the order of object entries in the YAML. Array order is left alone
- **Limits:** Up to 5 MB

## Questions

### Are my files uploaded?

No. The page loads its code once, then reads and processes your files inside the browser tab. Nothing is sent to a server; you can confirm it in your browser's network panel while a file is processed.

### How is this different from JSON to CSV?

That page turns a JSON array of records into a table. This page changes the document format between JSON and YAML, keeping the same structure. The two jobs are different, and that page is not changed here.

### Why is YAML to JSON on this URL?

The two directions are the same conversion in reverse. A second page would be a near-duplicate. The title leads with JSON to YAML because that is the easier query to rank; YAML to JSON is a mode here.

### Does it support YAML 1.1 features such as yes/no booleans?

No. This page uses YAML 1.2, so yes and no are ordinary strings unless you write true or false. That avoids surprises when a country code or a name is also a 1.1 boolean.

### Can I sort the keys?

Yes, when converting JSON to YAML. Nested maps are sorted as well. Arrays keep their order.

### Is there an API?

Yes. The MCP tool json_to_yaml on this site can convert in either direction. The text is not stored.

## Related tools

- [JSON to CSV converter](https://tools.cuelark.com/json-to-csv)
- [CSV to JSON converter](https://tools.cuelark.com/csv-to-json)
- [XML to CSV](https://tools.cuelark.com/xml-to-csv)
- [XML formatter](https://tools.cuelark.com/xml-formatter)
