# JSON to YAML

Convert JSON documents to YAML.

## URL

https://ilham.dev/tools/json-to-yaml/

## What It Does

Convert JSON to YAML, preserving the structure rather than reformatting the text. It is the usual way to move a config between a tool that speaks one and a file that is written in the other.

## Features

- Runs in the browser
- No login required

## Input

text input.

## Output

text output.

## Privacy

Processing happens locally in the browser.

No input data is uploaded to ilham.dev.

- Requires login: false
- Requires API key: false
- Stores user data: false


## Examples

- Are comments kept?
- Why does my document fail to convert?




## Questions

### Are comments kept?

JSON has no comments, so converting JSON to YAML cannot invent any. Going the other way, YAML comments are dropped because JSON has nowhere to put them.

### Why does my document fail to convert?

This tool parses **JSON** input, not YAML. A missing quote or comma in JSON can cause an error. YAML-only features such as anchors are not valid input here; start with valid JSON instead.

