Free JSON to YAML Converter

Convert JSON into clean, indented YAML, instantly and entirely in your browser.

How to convert JSON to YAML

  1. 1

    Paste your JSON

    Paste any valid JSON — an object, an array, or a nested structure — into the input box.

  2. 2

    Click "Convert →"

    The JSON is parsed and re-printed as indented, block-style YAML.

  3. 3

    Copy or download

    Click "Copy YAML" to grab the text, or "Download .yaml" to save it as a file.

Example use cases

1

Writing a config file

Turn a JSON config exported from a tool into the YAML format expected by Docker Compose, Kubernetes, GitHub Actions, or CI pipelines.

2

Making an API response human-readable

Convert a dense JSON payload into YAML's more scannable, indentation-based layout for reviewing or documenting it.

3

Migrating between formats

Move data from a JSON-based tool into a system or config format that only accepts YAML.

Frequently asked questions

What does this converter do?

It parses your JSON and re-prints the same data as block-style YAML — objects become indented key: value pairs, arrays become "- " list items, and strings are only quoted when YAML would otherwise misread them.

When does it quote a string?

A string is wrapped in double quotes when leaving it bare would change its meaning in YAML — for example if it looks like a number, a boolean (true/false/yes/no), null, is empty, starts with a YAML indicator character, or contains a colon or newline.

How are nested objects and arrays handled?

Nested objects are indented one level deeper under their key. Arrays are kept at the same indent as their key, with each item on its own "- " line — the common convention used by tools like Kubernetes and Ansible.

Is my data uploaded anywhere?

No. Conversion happens locally in your browser using JavaScript — nothing you paste is sent to a server.