# JSON ↔ YAML Converter

URL: https://phishdestroy.io/developer-tools/json-yaml-converter
Category: General dev
Where it runs: Runs locally (nothing you enter is uploaded)

Convert JSON into block-style YAML, or read simple key: value YAML back into JSON. The YAML side is a simplified converter, so check the result before you use it in a config.

## Example input

Blocking rule in JSON

```
{"rule":"block-phishing-domain","enabled":true,"domains":["login.example.com","verify.example.net"],"action":{"type":"sinkhole","ttl":300}}
```

JSON → YAML prints rule and enabled, a domains list with two - items and a nested action map (type: sinkhole, ttl: 300), indented with two spaces.

## FAQ

### How complete is the conversion?

JSON → YAML handles nested objects and arrays and writes block-style YAML with two-space indentation. YAML → JSON is a simplified line reader: it only understands flat key: value lines and converts true, false, numbers and empty values.

### What can go wrong?

Strings are written without quotes, so values such as "1.0", "yes" or text containing ": " or " #" can change type or break the YAML, and empty arrays or objects come out empty. YAML → JSON ignores indentation: nested keys are flattened into one object, list items are dropped or garbled, and quotes and inline comments stay part of the value.

### Is my data uploaded?

No. Both directions run in your browser and nothing is sent.

## Related tools

- [YAML Formatter](https://phishdestroy.io/developer-tools/yaml-formatter)
- [YAML to TOML Converter](https://phishdestroy.io/developer-tools/yaml-to-toml)
- [JSON to TOML Converter](https://phishdestroy.io/developer-tools/json-to-toml)
- [JSON Formatter](https://phishdestroy.io/developer-tools/json-formatter)
- [TOML to YAML Converter](https://phishdestroy.io/developer-tools/toml-to-yaml)

All tools: https://phishdestroy.io/developer-tools
