YAML to JSON Converter

How it works
Indent
Valid YAML

Input YAML

No problems found. This is valid YAML.

About YAML to JSON

Turn a YAML config or manifest into JSON for an API request, a JavaScript app or a tool that only reads JSON. The output is indented by default, and you can switch on Minify for a single line.

The YAML is checked first, so indentation mistakes are reported with their position rather than producing wrong JSON. A file with several documents separated by --- becomes a JSON array with one item per document.

How to use it

  1. Paste your YAML into the Input panel, or Open a .yaml or .yml file.
  2. Make sure the Output dropdown is set to Convert to JSON.
  3. Choose the indent, or turn on Minify for compact JSON.
  4. Copy the JSON or Download it as a .json file.

Frequently asked questions

What happens to YAML comments?

JSON has no comments, so they are dropped during conversion.

How are anchors and aliases handled?

They are expanded, so each alias becomes a full copy of the anchored value in the JSON.

What if my file has several YAML documents?

Each document becomes one element of a JSON array, in the same order.

Related tools