Skip to main content
Workbench

YAML to JSON Converter

Convert YAML into JSON, with honest warnings. Because JSON cannot represent comments, shared aliases, custom tags, or multiple documents, the converter tells you exactly what changes before you rely on the output.

Inputyaml
Loading editor…
YAML○ Not checked0 lines0 chars0 B

How to use the yaml to json

  1. Paste or upload YAML.
  2. Press Convert to JSON.
  3. Review any warnings: JSON cannot represent comments, shared aliases, custom tags, or multiple documents faithfully.
  4. Copy or download the JSON result.

Example: Converting YAML with an anchor

Input
defaults: &d
  retries: 3
prod:
  <<: *d
Output
{
  "defaults": { "retries": 3 },
  "prod": { "retries": 3 }
}

The alias *d is expanded in JSON. The converter warns you so the loss of the shared reference is never a surprise.

Frequently asked questions

What warnings might I see?
You are warned when comments will be dropped, when aliases are expanded, when custom tags cannot be represented, and when multiple documents are combined into a JSON array.
Why does JSON lose information from YAML?
JSON has no concept of comments, anchors/aliases, tags, or multiple documents. The converter makes these trade-offs explicit instead of hiding them.
Are multiple YAML documents supported?
Yes. They are converted into a JSON array, with a warning explaining the transformation.