Skip to main content

JSON ↔ YAML Converter

Convert between JSON and YAML, with the exact error shown when something is off.

YAML result
Your result will appear here

Converted entirely in your browser — nothing is sent to a server.

About this tool

The JSON ↔ YAML converter switches your data between the two formats developers meet most. Paste something in and the result converts as you type, with the exact position of any syntax error called out.

The job most people arrive with is config files — docker-compose, Kubernetes manifests, GitHub Actions workflows and most framework configuration are YAML, while most APIs answer in JSON. Moving data between those two worlds by hand is how indentation bugs get made.

One behaviour surprises people: YAML treats y, n, on and off as booleans, so the converter quotes them when needed. That is not a formatting glitch — it is what keeps a key literally named n from silently becoming false, and it means the output always round-trips back to your original data.

Everything runs in your browser, with no upload, so config files containing internal hostnames or service names never leave your device. Free, with no sign-up.

How to use

  1. 1Pick a direction: JSON → YAML or YAML → JSON
  2. 2Paste your data into the input box, or use the Paste button to pull it from your clipboard
  3. 3The result converts as you type, and points at the line that is wrong if the format is invalid
  4. 4Copy the result or download it as a file

Frequently asked questions

Why did some keys get quotes around them in the YAML output?
YAML 1.1 reads y, n, on, off, yes and no as booleans. Without quotes, a key called n would become false. The converter quotes them so the data survives, and converting back to JSON returns exactly what you started with.
Does it handle docker-compose or Kubernetes files?
Yes. It uses the same standard YAML parser production tooling uses, so nested structures, lists and multi-line values all work as specified.
Is my data sent to a server?
No. The whole conversion happens in your browser, so it is safe to paste config files containing internal details.
What is the difference between YAML and JSON, and which should I use?
JSON is better for moving data between systems: strict, unambiguous and easy for machines. YAML is better for config files people edit by hand, because it is shorter and supports comments.
Where did my YAML comments go?
Standard JSON has no comment syntax, so comments are always lost when converting YAML to JSON. Keep the original YAML file if you need them.

Related tools

JSON Formatter

Format, validate and minify JSON — for developers.

JSONPath Tester

Pull just the values you need out of a big JSON payload.

JSON ↔ CSV / XML Converter

Convert JSON to CSV or XML, and CSV back to JSON.

XML Formatter

Indent XML and check the structure is valid.