The converter uses js-yaml to parse YAML 1.2 (including anchors, aliases, multi-line strings and multiple documents) and outputs formatted JSON. Syntax errors are reported with the line and column.
How to convert YAML to JSON
- Paste YAML or open a .yml/.yaml file.
- Press Convert to JSON.
- Copy or download the JSON.
Common YAML mistakes
- Using tabs for indentation (YAML only allows spaces).
- Missing space after a colon:
key:valueshould bekey: value. - Unquoted strings with special characters such as
:or#. - Inconsistent indentation inside lists.
Frequently asked questions
Are comments kept?
No. JSON has no comments, so YAML comments are dropped.
Updated October 2026 · Built and tested by Sharjeel Tahir · How our tools are tested