Skip to content

JSON to YAML

Make readable YAML from any JSON in a moment.

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

A string is quoted only when YAML would otherwise read it as something else. "007", "true" or "null" stay quoted so they remain strings, while ordinary text is written without quotes.

Yes, 2 or 4 spaces. Most YAML files, including Kubernetes and GitHub Actions configs, use 2. Long strings are never wrapped, so values stay on one line.

No. Every live tool on JustYourConvert opens and converts your files inside your browser, on your own device. Nothing is sent to our servers, and the result is saved straight from your browser.

Yes. Every tool is free, with no sign-up, no watermark and no daily limit. Clearly labeled ads keep it that way.

Only your device's memory. Because the work happens in your browser, very large files can be slow on phones and older computers. Each tool says its practical limit under the drop area.