{}devfolio/tools

YAML ⇄ JSON

New

Convert YAML to JSON and back, with error line numbers.

YAML
0 lines · 0 chars · 0 bytes
JSON
0 lines · 0 chars · 0 bytes

How to use the YAML ⇄ JSON

  1. 1Choose YAML → JSON or JSON → YAML.
  2. 2Paste your input or click Sample (a Kubernetes Deployment).
  3. 3Copy or save the converted output. Click Flip to convert it back the other way.

Questions

Are YAML comments kept?

No. JSON has no comments, so they're dropped when converting to JSON and can't come back when converting to YAML.

Does it support multi-document YAML (---)?

Not yet. A file with several documents shows an error, so split it and convert each part.

Which YAML version is used?

YAML 1.2, via the open-source yaml library. Some older tools follow YAML 1.1, where values like yes and no become booleans; in 1.2 they stay strings.

You might also need