JSON to YAML Converter

Convert JSON to YAML, or YAML to JSON.

Options
YAML

Examples

Questions

Why did my YAML value no become false somewhere else?

YAML 1.1 read no, off and n as booleans, so the country code for Norway became false. This is known as the Norway problem. YAML 1.2 dropped that rule, and this converter follows 1.2.

Why does "no" come out with quotes?

Many tools still read YAML 1.1, including PyYAML, Ruby's Psych and a lot of Kubernetes tooling. Quoting no, y, on and off costs nothing and stops them turning into booleans.

What happens to anchors and aliases?

Each alias is replaced by a copy of the value, because JSON has no references. An anchor that refers to itself can't be converted and gives an error.

Can it convert a YAML file with several documents?

No. A JSON file holds exactly one value. Instead of dropping the rest, the tool shows an error that points to the line. Split the file at each --- and convert the parts one at a time.

Are my large ID numbers safe?

The JSON side flags any integer too big to keep exactly. The YAML output still holds it as a number, and whatever reads the YAML may round it, so the warning tells you to check it.

Is anything uploaded?

No. The YAML library loads from this site the first time you convert, and converting runs in your browser.