YAML to JSON

Convert YAML to JSON in your browser. Block scalars, flow collections, comments and every quoting style are read correctly. Your file never leaves this page. Everything happens in your browser, and there is no upload endpoint to send it to — that is checked by a build gate that fails if any network code reaches a tool’s bundle.

How to do it

  1. Paste your YAML.
  2. Press Convert to JSON.
  3. Press Copy.

Questions

What gets lost?

Comments, because JSON has no way to hold them. Anchors and aliases are refused by name rather than converted — expanding them wrongly would change what your file means, and a silent wrong answer is worse than being told to expand them by hand.

Does it read yes and no as booleans?

No. This follows YAML 1.2, where only true and false are booleans. YAML 1.1 turned no into false, which is why country-code lists used to lose Norway.

Why did it refuse my file?

Most often a tab in the indentation, which YAML does not allow, or an anchor. Both are named with the line they are on.

Related tools

Browse every tool