Skip to content

JSON to YAML

Make readable YAML from any JSON in a moment.

  • 100% Free
  • No Sign Up
  • Nothing Uploaded

How to convert JSON to YAML

Three steps, all in your browser.

  1. 1

    Paste or open your data

    Drop a file or paste rows straight into the input box.

  2. 2

    Check the options

    Delimiter, header row, indentation: the output updates live.

  3. 3

    Download

    Save the converted file, or copy the output.

JSON to YAML: what to know

JSON is precise but noisy to read and edit by hand, with braces, brackets and quotes everywhere. YAML holds the same data with indentation instead, which is why it's the usual choice for configuration files. This converter turns JSON into clean YAML in your browser.

Objects become indented key: value blocks and arrays become lists with a dash in front of each item. Strings are quoted only when YAML would otherwise read them as something else, so "007", "true" and "null" keep their quotes and stay strings, while ordinary text is written bare. Numbers, booleans and null are written as YAML values, and long strings are never folded onto extra lines. The output is YAML 1.2, which YAML 1.1 parsers also read in nearly all cases.

Choose 2 or 4 spaces for indentation. JSON Lines files, with one value per line, are read as a list. Because JSON is a subset of YAML, the conversion is lossless: converting the YAML back gives the same data.

Popular uses

  • Turning JSON settings into a Kubernetes, Compose or CI config
  • Making API examples easier to read in documentation
  • Editing a large JSON file in a more readable form

Tips for the best result

  • Most YAML config files use 2-space indentation; keep that unless your project says otherwise.
  • Comments can't come from JSON, so add them to the YAML after converting.
  • Check the result with the YAML to JSON converter if you edit it by hand.

Read how JustYourConvert works and our privacy details. Keep your original files and check a converted file before you replace anything.

Frequently asked questions