Answer

How to convert YAML to JSON

Convert YAML to valid JSON instantly in your browser. Free, private, nothing uploaded.

Paste your YAML into a YAML-to-JSON converter to get the JSON equivalent. Indented mappings become objects, dash lists become arrays, and the result is standard, parseable JSON.

Input
name: app
port: 8080
debug: true
Output
{
  "name": "app",
  "port": 8080,
  "debug": true
}

Unquoted YAML scalars are inferred as numbers/booleans where appropriate.

Open the YAML to JSON → Free · runs in your browser · nothing uploaded

Steps

  1. Open the YAML ⇄ JSON tool and set the direction to YAML → JSON.
  2. Paste your YAML into the input box.
  3. Read the formatted JSON output and copy it.
  4. Watch for indentation errors in the source YAML — they are the most common cause of conversion failures.

Frequently asked questions

Why does my YAML fail to convert?
YAML is whitespace-sensitive, so inconsistent indentation or tabs (YAML requires spaces) are the usual culprits. Fix the indentation and the conversion will succeed.