YAML ⇄ JSON Converter
Convert YAML to JSON and JSON to YAML, with clear error positions.
How to use YAML ⇄ JSON Converter
- Paste YAML or JSON (or open a .yaml/.json file).
- Choose the direction.
- Copy or download the converted output.
How it works
Conversion uses js-yaml with the YAML 1.2 core schema. Under YAML 1.2, words like yes, no and on stay strings rather than turning into booleans (a common YAML 1.1 surprise), and dates stay as text.
Several documents separated by --- are converted into a JSON array. When the YAML is invalid, the error shows the line and column, which usually points at an indentation problem.
Frequently asked questions
Why did "yes" not become true?
In YAML 1.2, only true/false are booleans. Older YAML 1.1 parsers treat yes/no/on/off as booleans; check which version your application uses.
Are comments preserved?
No. JSON has no comments, so YAML comments are dropped when converting to JSON.
Can it validate Kubernetes or Docker Compose files?
It checks that the YAML is well-formed. It does not check the schema of a specific tool.
Is my config uploaded?
No. Conversion happens in your browser; nothing is saved.
Limitations
- Anchors and aliases are expanded in JSON output.
- Custom YAML tags (such as !Ref in CloudFormation) are not supported and show an error.
Last reviewed November 9, 2026. How we build and test tools.