Converter

JSON to YAML Converter

Paste JSON, get YAML. The output is block style with two-space indentation and keys in their original order, so it reads like something a person wrote rather than something a script dumped. Values that YAML would misread as booleans or numbers are quoted, which keeps the round trip exact.

Drag and drop a .json, .yaml or .yml file onto the input and the direction is detected for you.

How to convert JSON to YAML

  1. 1. Put JSON in

    From an API response, a package.json, a Terraform plan, a settings export — paste it or drop the file.

  2. 2. Watch it become YAML

    Objects turn into indented blocks, arrays into dash lists. Invalid JSON reports the position rather than producing half a document.

  3. 3. Copy it into your config

    Copy the output or save it as .yaml. Because nothing leaves the browser, a production config is no riskier here than a test one.

Why move JSON into YAML

Config you are meant to read. Kubernetes manifests, docker-compose files, GitHub Actions workflows and Ansible playbooks are all YAML-first. A JSON blob handed to any of them works, but nobody reviewing the pull request will enjoy it.

Fewer braces, more structure. YAML expresses the same tree with indentation instead of braces and quotes, which is why it wins for hand-edited files. This converter keeps that output readable rather than mechanically dumping a single line.

A starting point, not the finish. Once the shape is YAML you can add comments, pull repeated blocks into anchors, and split a long file into documents separated by --- — none of which JSON allows.

Frequently asked questions

Can I convert JSON to YAML online for free?
Yes. Paste JSON or drop a .json file and readable block-style YAML appears immediately. There is no account, no upload, and no cap on file size beyond what your own browser can hold.
Is the JSON sent to a server?
No. Parsing happens in your browser with a JavaScript YAML library. After the page loads you can turn off your network and the conversion still works.
Why are some of my strings quoted in the YAML output?
YAML reads bare words like yes, no, on, off and 8080 as booleans or numbers in some dialects. Quoting them keeps the value a string, so the YAML parses back into the JSON you started with.
Does the YAML keep my key order?
Yes, by default. Keys come out in the order they appear in the JSON object. The main formatter has a Sort keys option when you want them alphabetised instead.
What happens to JSON features YAML has no equivalent for?
null becomes null, nested objects become indented blocks, and arrays become dash lists. JSON has no comments, so there is nothing to lose on that front.
Is this the same as the YAML formatter on the home page?
It is the same engine, pointed the other way. Use this page when JSON is your input; use the formatter when you want YAML cleaned, validated, or converted onward to JSON, TOML or XML.