JSON ⇄ YAML Converter
Paste JSON to get clean, properly indented YAML — or paste YAML to get formatted JSON. Powered by the js-yaml library running locally, so configs with secrets never leave your machine.
How to use
- Paste JSON or YAML into the input box.
- Click the direction you need: JSON → YAML or YAML → JSON.
- Copy the converted output.
Examples
{"replicas": 3, "image": "nginx:1.25"}replicas: 3 image: nginx:1.25
Supported formats
- JSON input: strict JSON (RFC 8259). YAML input: YAML 1.2 via js-yaml's safe loader.
- Output: 2-space indented JSON, or YAML wrapped at 100 columns.
Privacy
Your input is processed in your browser and is never uploaded. The first time you use the tool, your browser downloads its open-source processing library from cdnjs.cloudflare.com — the library is downloaded, your data is not sent. Privacy policy.
Limitations
- YAML features with no JSON equivalent (anchors/aliases, comments, custom tags) are resolved or dropped in conversion — round-tripping such files loses them.
FAQ
Why convert JSON to YAML?
YAML is the configuration format of Kubernetes, Docker Compose, GitHub Actions and most CI systems — it's the same data model as JSON but easier for humans to read and edit.
Are YAML anchors preserved?
No — anchors and aliases are expanded during parsing, and comments are dropped, because JSON has no way to represent them. The data itself converts faithfully.
Is my config uploaded anywhere?
No. Conversion runs locally with the js-yaml library, so files containing tokens or credentials stay on your machine.