Skip to tools

Converters

JSON to YAML

YAML is the preferred format for Kubernetes, Docker Compose, CI pipelines and many other configuration systems. The JSON to YAML converter turns objects into indented key/value pairs and arrays into dash-prefixed lists, ready to paste into a config file.

Because YAML is a superset of JSON, the conversion is lossless for standard JSON data.

How to use the JSON to YAML

  1. 1Use the JSON to YAML right on this page, or open the full workspace for history, sharing and every other tool.
  2. 2Paste your input, upload a file, or drag and drop a file onto the input box (up to 25 MB).
  3. 3The result appears in the output panel automatically and updates when you change the input or an option.
  4. 4Use Copy Output or Download to save the result. Nothing is uploaded to a server.

Example

A JSON object with a list becomes YAML with nested keys and dash-prefixed items.

Input
{"name":"Ada","skills":["math","logic"]}
Output
name: Ada
skills:
  - math
  - logic

When to use it

  • Turning a JSON API example into a Kubernetes or Helm values file
  • Writing CI configuration based on JSON output from another tool
  • Making long JSON configs easier to read and comment

Tips and common mistakes

  • After converting, you can add YAML comments starting with # to document settings.
  • Strings that look like booleans or numbers are quoted automatically.
  • Run the YAML Formatter if you edit the result by hand.

Frequently asked questions

Will my data change type?

No. Numbers, booleans, nulls and strings keep their types.

Can I convert back?

Yes, use the YAML to JSON tool.

TutorialYAML: the config format DevOps fell in love with

Related tools

Ready to try it?

Free, no sign-up, and your data never leaves your browser.