What this tool does
YAML's rules for indentation, block text, quotes, anchors, and scalars are more complex than they appear, so this tool uses a mature js-yaml parser to identify common structures and generate standard JSON.
- Supports common YAML 1.2 structures and block text.
- Parse settings depth, alias and merge key limits to reduce the risk of lags caused by malicious and complex input.
- After conversion the result is generated using standard JSON.stringify.
How to use it
- Paste the YAML document.
- Click "Convert to JSON".
- If the syntax is invalid, correct the indentation or scalar according to the row and column prompts.
- Copy the results or download result.json.
Common uses
- Convert CI/CD or container configuration to JSON.
- Check the final resolved type of the YAML scalar.
- Migrate configuration when your app only accepts JSON.
YAML → JSON Features
Convert objects, arrays, and scalars using a mature YAML parser and report syntax errors. It is suitable for daily development, debugging, data sorting and code optimization scenarios. The processing results can be directly viewed, copied or downloaded.
FAQ
Why not parse the YAML yourself?
YAML contains multi-line scalars, anchors, escaping and complex indentation rules, and mature parsers can cover more edge cases.
Will yes be converted to a boolean?
The tool adopts the YAML 1.2 core rules of the current js-yaml; it is recommended to explicitly write true/false to avoid ambiguities between different YAML versions.
Can a file contain multiple YAML documents?
This page is converted as a single document; if you enter multiple --- separated documents, corresponding restrictions or parsing errors will be displayed.