Online JSON to YAML converter. Just paste valid JSON to get YAML.

JSON text input:
Result YAML:

What is YAML?

YAML is a human-readable friendly language for communication between people (software developers) and computers. It can be used as an alternative to JSON to store some data or configuration. For example, YAML language is widely used to store settings for CI pipelines like GitHub Workflows, or to store localization phrases. YAML files can be with .yaml or .yml extension.

How to use JSON to YAML converter?

Paste JSON text into the first text area. Click on "JSON to YAML" button to perform conversion. If your JSON is valid you will see its YAML representation in the second text area. If your JSON has invalid syntax the conversion isn't possible, and the error will be displayed right under JSON input. Click on "Paste JSON and YAML examples" to see the tool in action.

This is a JSON to YAML transformer. If you need to do an opposite operation please use YAML to JSON tool.

How to convert JSON to YAML in JavaScript?

You can use some popular NPM packages for it, for example yaml or js-yaml. Both of them are listed on the official YAML site.