YAML to JSON
Convert YAML, such as a config file, into JSON as you type. Errors in the YAML show the exact line and column.
Your files stay on your device. Nothing is uploaded.
Step 1: Paste or open your YAML
Step 2: Options
Step 3: Copy or download
How to convert YAML to JSON
-
Paste or open your YAML
Paste YAML into the first box, or click Open a file. The conversion runs as you type.
-
Choose the options
Choose the JSON layout: 2 spaces, 4 spaces, tabs or one line.
-
Copy or download
Click Copy JSON, or Download .json for a file.
About this tool
How values are read
YAML's core rules are used: 42 and 3.5 become numbers, true and false become booleans, and null or ~ becomes null. Dates such as 2026-11-29 stay text, so they are not changed into a different time format.
Common YAML mistakes
YAML uses spaces for structure, never tabs, and items at the same level must line up exactly. A wrong indent is the most common error; the message points to the line.
Where YAML is used
Docker Compose, Kubernetes, GitHub Actions, OpenAPI files and many app settings are written in YAML. Converting to JSON helps when a tool or API only accepts JSON.
Privacy
This tool runs in your browser, on your own device. Your files and text are not uploaded to our server and we cannot see them. When you close or reload this tab, they are cleared, along with the results.
Frequently asked questions
Are comments kept?
No. JSON has no comments, so YAML comments are left out.
Does it support several documents in one file?
No, one YAML document at a time. Split documents separated by --- and convert them one by one.
Is my data sent anywhere?
No. The conversion runs in your browser.
Can I go back to YAML?
Yes, with JSON to YAML.
Related tools
- JSON › YAML JSON to YAML Convert JSON to clean, readable YAML as you type.
- XML › JSON XML to JSON Convert XML to JSON as you type, attributes included.
- JSON › XML JSON to XML Convert JSON to well-formed XML as you type.
- JSON › CSV JSON to CSV Turn a JSON list of objects into a CSV table.
- JSON › XLSX JSON to Excel Turn a JSON list of objects into an Excel sheet.
- CSV › JSON CSV to JSON Turn a CSV table into a JSON array of objects.
- XLSX › JSON Excel to JSON Turn an Excel sheet into a JSON list of objects.
- Aa › AA Case converter Change text to upper, lower, title or sentence case.