📗

JSON to YAML

Convert JSON data into readable YAML

🔄 ConvertersFreeRuns in your browser

YAML output

—

Two-space indentation, quoted strings where YAML requires them, and nested arrays and objects are all handled.

About the JSON to YAML

The JSON to YAML Converter turns an object into readable YAML. It quotes strings only where YAML requires it and indents nested objects and arrays consistently at two spaces.

YAML is easier to review in a pull request than a wall of JSON. Convert a config once, then keep the YAML as the source of truth and generate JSON only where a tool demands it.

  • ✓Two-space indentation
  • ✓Quotes strings only when needed
  • ✓Handles arrays of objects

How to use the JSON to YAML

  1. 1

    Paste valid JSON.

  2. 2

    Optionally sort keys alphabetically.

  3. 3

    Convert and copy the YAML.

Frequently asked questions

Why is a string wrapped in quotes?+

Values that look like numbers, booleans, or null must be quoted, otherwise YAML would read them as another type. The converter adds quotes only in those cases.

Does key order survive?+

Yes, unless you enable sorting. JavaScript preserves insertion order for string keys, so the output follows your input.

Save JSON to YAML to your favorites, or keep browsing converters.

Browse all 45 converters →