JSON to YAML
Convert JSON data into clean, quoted-safe YAML
Indentation is semantics in YAML
Safe quoting, always
Strings that YAML would read as numbers, booleans, dates or "yes/no" get quotes automatically, so the file reloads into the same data every time.
Block style, not JSON-lookalike
Nested objects and arrays become clean indentation-based YAML blocks — far more readable than brace-laden JSON in a config file.
Round-trip guaranteed
Every emission choice is tested to be reversible: the YAML parses back to an identical JavaScript object, so nothing is lost in translation.
What is a JSON to YAML converter?
YAML is the standard format for configuration — Docker Compose files, GitHub Actions workflows, Kubernetes manifests and Ansible playbooks all use it. A JSON to YAML converter reformats structured JSON into YAML syntax so you can drop it into a config file, a documentation example, or a CI pipeline. The conversion is careful: strings that a YAML parser would otherwise misinterpret (numbers, dates, booleans, "yes"/"no", colons, hashes) are quoted, and nested structures become indentation-based blocks instead of braces.
What it can do
- Convert any JSON document to block-style YAML
- Quote strings that would be misparsed as numbers, booleans or dates
- Render nested objects, arrays, empty objects and empty arrays correctly
- Choose two- or four-space indentation
- Produce output that reloads to the identical source data
- Copy or download the YAML result
When to use it
- Writing Docker Compose or GitHub Actions configuration by hand is error-prone — start from JSON
- Preparing YAML examples from a JSON API response
- Building Kubernetes or Ansible manifests from JSON models
- Converting legacy JSON config into a team-standard YAML
Privacy: the conversion happens entirely in your browser — nothing you paste is ever uploaded.
Mapping rules and deliberate limits
- Two-space indentation, keys quoted only when YAML would otherwise misread them (the classic trap: a text value of
nobecoming boolean false in YAML 1.1 parsers). - Multiline strings prefer block scalars (
|) over escape soup when line breaks survive round-trips. - Anchors, aliases and custom tags are deliberately not emitted — plain JSON has no equivalent, and inventing them would break re-parsing.
Frequently asked questions
Why are some strings quoted?⌄
Plain YAML resolves bare values by their shape: "true" is boolean, "3.14" is a number, "2026-01-01" is a date. The converter quotes exactly those strings so the YAML loads as the original strings and never silently changes type.
Does every JSON shape convert?⌄
Yes. Objects, arrays, strings, numbers, booleans, null, empty objects and empty arrays all convert. The output follows block YAML (indentation-based) with optional 2- or 4-space indentation.
Is my JSON uploaded anywhere?⌄
No. Everything runs in your browser with plain JavaScript — nothing you paste is transmitted or stored.