JSON YAML
Free online converter

Convert JSON to YAML

Convert now
JSON to YAML converterFREE

On this page

Tested on macOS, Windows & Linux
Last verified Oct 2026

More free converters

HEIC, PNG, WEBP, MP3 and more - every tool here is free.

Open the toolbox

How to convert JSON to YAML

  1. Add your .JSON file - drop it in the box above or click to browse.
  2. Convert it to .YAML in a few seconds.
  3. Download your new .YAML file.

What to expect

  • The conversion is lossless - JSON objects, arrays, strings, numbers, booleans, and null all map exactly to YAML equivalents.
  • YAML supports comments (lines starting with #) but converters cannot add them for you; add comments manually after converting.
  • Bare YAML values such as yes, no, on, and off can be misread as booleans by some parsers - check the output if your data contains these strings.

Frequently asked questions

Is converting JSON to YAML lossless?
Yes. JSON's data model is a strict subset of YAML's, so every key, value, and structure carries over exactly - nothing is dropped or changed.
Can I convert YAML back to JSON?
Yes, the reverse is equally lossless. With yq, run yq -oj file.yaml > file.json.
Why does my YAML parser reject the converted file?
The most common cause is tab characters used for indentation - YAML requires spaces only. This usually happens when a file is hand-edited after conversion; replace tabs with spaces and the parser should accept it.
Is a `.yaml` file the same as a `.yml` file?
Yes - .yml and .yaml are both valid extensions for the same format and are accepted by all standard YAML parsers.
Learn about the formats: .JSON · .YAML
Programs that convert JSON: JSON formatter