YAML JSON
Free online converter

Convert YAML to JSON

Convert now
YAML to JSON converterFREE
Drop a .YAML file here
or pick one - we convert it to .JSON and give you the file to download

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 YAML to JSON

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

What to expect

  • Comments are dropped - JSON has no comment syntax, so all YAML # ... lines disappear from the output.
  • YAML anchors and aliases expand - each reused block is written out in full in the JSON, so the file may be larger than expected.
  • YAML 1.1 bare booleans (yes, no, on, off) may be treated as strings by modern tools; check the output if your file uses them.

Frequently asked questions

Is YAML-to-JSON conversion lossless?
For data, yes - all values, keys, and structures copy over intact. The only loss is YAML comments, which JSON cannot represent.
Can I convert JSON back to YAML?
Yes, equally lossless. With yq: yq -oy file.json > file.yaml.
What happens to multi-document YAML files?
JSON has no multi-document concept; tools like yq combine them into a single JSON array - confirm that is what your consuming tool expects.
Why does yq write `null` where my YAML had an empty value?
An empty YAML value (key: with nothing after it) is a valid null, and JSON represents it explicitly as null - this is correct behavior.
Learn about the formats: .YAML · .JSON