</> Format Swapper

JSON · XML · CSV · YAML — convert between any of them

YAML to JSON Converter

Convert YAML documents into JSON. Free, instant, and no signup required.

Input (YAML)
Output (JSON)

About YAML to JSON conversion

YAML is the go-to format for configuration files across the DevOps world — Kubernetes, Docker Compose, GitHub Actions, Ansible — valued for supporting comments and multi-document files, which JSON can't do. JSON is the lingua franca of web APIs and NoSQL stores like MongoDB — every mainstream language can parse it natively, but it can't represent comments or trailing commas.

This is close to a lossless round-trip — YAML is a superset of JSON’s data model, so every JSON value maps directly onto a YAML value. The visible difference is indentation-based block style replacing JSON’s braces, brackets, and commas.

How to convert YAML to JSON

  1. Paste your YAML into the left editor, or click sample above it to try example data.
  2. Click Convert. The JSON result appears on the right instantly.
  3. Click copy to copy the result, or download to save it as a file.

Example

Input (YAML):

name: Ada Lovelace
role: Mathematician
active: true
skills:
  - math
  - programming

Output (JSON):

{
  "name": "Ada Lovelace",
  "role": "Mathematician",
  "active": true,
  "skills": [
    "math",
    "programming"
  ]
}

Frequently asked questions

Does converting JSON to YAML lose anything? Essentially no — YAML is a superset of JSON's data model, so every JSON value (object, array, string, number, boolean, null) maps directly to an equivalent YAML value. The only real change is visual: indentation-based blocks instead of braces and commas.
Do I need to create an account? No. There's no signup, login, or account required — paste your data and click Convert.
Is there a file size limit? There's no hard-coded limit, but very large inputs (multi-megabyte files) can slow down or briefly freeze the tab while converting. For big files, converting in smaller chunks works better.
Why did my conversion fail? Check the status line under the Convert button — it reports the exact line and column where the parser stopped, and the input editor highlights that line in red so you can jump straight to it.