YAML to JSON Converter

Paste YAML, get formatted JSON.

Paste a YAML document and get the equivalent JSON, formatted with two-space indentation. This is handy when a tool only accepts JSON, when you want to query a manifest with a JSON tool, or when you simply need to see how YAML's indentation was interpreted.

The YAML is validated while you type, so indentation mistakes and duplicate keys are reported with their line number before you ever copy the result.

How to use it

  1. Paste YAML into the left editor.
  2. Check the status indicator for syntax errors.
  3. Copy or download the JSON from the right pane.

Questions

Are anchors and aliases supported?

Yes. Anchors (&name) and aliases (*name) are resolved, and the referenced content is written out in full in the JSON.

What happens to YAML comments?

JSON has no comment syntax, so comments are dropped during conversion.

Does it handle multi-document YAML files?

The converter expects a single document. Split files that use the --- separator and convert each part separately.

All tools