YAML to JSON
Convert YAML configuration files to JSON format.
Convert YAML to JSON. Paste a YAML file, such as a Kubernetes manifest, a Docker Compose file or an OpenAPI spec, and get the same data as indented JSON. Anchors and aliases are expanded, and a file with several documents (separated by ---) becomes a JSON array. If the YAML has an error, you get its line and column instead. Conversion uses js-yaml in your browser.
Common use cases
- Feed a YAML config to a tool or API that only accepts JSON
- Convert an OpenAPI or Swagger spec from YAML to JSON
- Check how YAML values are typed (strings, numbers, booleans)
- Turn YAML test data into JSON fixtures
How to use
- Paste the YAML.
- Choose the JSON indent.
- Copy or download the JSON.
FAQ
Why did 'no' become false?
Older YAML (version 1.1) treats yes, no, on and off as booleans. js-yaml follows YAML 1.2, where only true and false are booleans, but quote values like 'no' if other tools will read the file.
Are comments kept?
No. JSON has no comments, so YAML comments are dropped.
Can I go back to YAML?
Yes, with the JSON to YAML converter.
Related tools
- JSON to YAMLConvert JSON data to YAML configuration format.
- XML to JSONConvert XML documents to JSON format.
- CSV to JSONConvert CSV data to JSON format for APIs and applications.
- JSON to CSVConvert JSON arrays to CSV spreadsheet format.
- JSON to XMLConvert JSON data to XML document format.
- CSV Diff CheckerCompare two CSV files and highlight differences.