How to convert JSON to YAML
- Drop your JSON files into the box above, or click it to choose from your device.
- YAML is already selected for you. Press "Convert to YAML".
- Download each new YAML file, or grab them all at once as a ZIP.
Why convert JSON to YAML?
JSON files are best for APIs and app data. YAML is the better choice for configuration files people edit by hand. It opens in code editors, while JSON opens in code editors and every programming language.
YAML is lossless, so nothing your JSON file contains is thrown away on the way.
JSON vs YAML at a glance
| JSON | YAML | |
|---|---|---|
| Compression | Plain text | Plain text |
| Opens in | Code editors and every programming language | Code editors |
| Best for | APIs and app data | configuration files people edit by hand |
What happens to your file
Your table is read into rows and columns with SheetJS and Papa Parse, two widely used open-source data libraries, then written out in the new format. Numbers stay numbers, the first row becomes the column headers, and nested values that a flat table cannot hold are kept as JSON text inside the cell rather than being dropped.
Tips for a clean conversion
- Drop a whole folder's worth of JSON files at once. They convert one after another and you can download everything as a single ZIP.
- Keep your original JSON files until you have checked the results. Converting back later is rarely lossless.
- YAML keeps everything it receives, so the result is only ever as good as the JSON file you start with.
About the formats
JSON: The data format of the web and most APIs.
YAML: Human-friendly data format used for configuration files.
Questions
- Is it safe to convert JSON to YAML here?
- Yes. The conversion runs entirely inside your web browser. Your JSON file is never uploaded to a server, so nobody else can see it.
- Will I lose quality?
- YAML is lossless, so nothing your JSON file contains is thrown away on the way.
- Can I convert several JSON files at once?
- Yes. Drop as many files as you like. Each one is converted in turn, and you can download them one by one or all together as a ZIP.
- Is it free?
- Yes. There is no sign-up, no watermark and no limit on how many files you convert.
- Does it work on a phone?
- Yes. The converter runs in any modern browser, including Safari on iPhone and Chrome on Android, so you can convert JSON files without installing an app.