Runs in this tab. A token, a key, a config — whatever you paste stays local.
Loading the tool…
Free Online JSON to YAML Converter
How it works
YAML 1.2, and the traps from 1.1
This converts against YAML 1.2, whose core schema resolves only true and false as booleans. YAML 1.1 parsers — which include a lot of tooling still in production — also read y, yes, on, off, n and no as booleans. That is the Norway problem: a country list containing NO becomes false rather than Norway. The fix in either version is the same, quote the scalar.
- Booleans
- YAML 1.2 accepts true and false only. Under 1.1, yes/no/on/off/y/n also coerce — quote them to keep them as text.
- Version numbers
- Unquoted 1.20 is the number 1.2 and the trailing zero is gone. A version belongs in quotes: "1.20".
- Leading zeros
- A ZIP code or phone number like 01234 can be read as octal by a 1.1 parser and loses its zero in either. Quote identifiers that only look numeric.
- Indentation
- Spaces only — the spec forbids tabs for indentation, and a stray tab is a parse error rather than a warning.
- Anchors and merges
- &anchor, *alias and << merge keys have no JSON equivalent, so converting to JSON expands them into repeated data.
How to use it
How to convert JSON to YAML online
- 01
Paste JSON or YAML
The direction is picked from what you paste; multi-document YAML is fine.
- 02
Check the coerced scalars
Look at anything that was unquoted and could be read as a boolean, a number or a date.
- 03
Copy the result
Straight into a manifest, a workflow file or a request body.
Where it earns its keep
Where JSON to YAML conversion comes up
- Turning an example JSON config from documentation into a Kubernetes manifest.
- Reading a GitHub Actions workflow as JSON to reason about its structure.
- Converting a docker-compose file for a tool that only accepts JSON.
- Checking that hand-written YAML parses at all before a pipeline rejects it.
Questions
JSON ↔ YAML, answered
Do comments survive the conversion?
No. JSON has no comment syntax, so YAML comments are dropped on the way to JSON and cannot be recovered on the way back. If the comments are the documentation for a config, convert a copy.
Is my config uploaded anywhere?
No. Parsing and serialising happen in this browser tab, so a manifest holding a registry credential or an environment secret never reaches a server.
Why did my value no turn into false?
That is YAML 1.1 boolean coercion, still present in plenty of parsers. We parse as YAML 1.2, where no stays a string — but the file may be read later by a 1.1 parser, so quote it anyway.
Can it handle multiple documents in one file?
Yes on the way in: --- separated documents parse into a JSON array. On the way back, an array of objects becomes a single YAML sequence rather than multiple documents, because that mapping is the unambiguous one.