JSON Converters Code Gen Formatters All tools Browse all tools built byAbhay Darji

YAML to JSON Converter

Convert YAML to JSON online, free and instantly. Runs entirely in your browser — nothing is uploaded, and there is no file size limit.

100% client side No upload No size limit Works offline
Input
Output
Ready
Drop a file to load it

About this tool

Convert YAML into JSON in a single step. YAML is the configuration format used by Kubernetes, CI pipelines and Docker Compose; JSON is the default interchange format for web APIs. The converter is structure-aware rather than a text substitution, so nesting, types and ordering are preserved.

When you would use it

  • Working with YAML data in a codebase that expects JSON
  • Migrating a dataset from YAML to JSON
  • Inspecting YAML in a shape that is easier to read

Worked example

YAML
id: 4815
name: Ada Lovelace
active: true
score: 91.5
roles:
  - admin
  - editor
address:
  city: London
  postcode: NW1
JSON
{
  "id": 4815,
  "name": "Ada Lovelace",
  "active": true,
  "score": 91.5,
  "roles": [
    "admin",
    "editor"
  ],
  "address": {
    "city": "London",
    "postcode": "NW1"
  }
}

Things worth knowing

  • Anchors and aliases are resolved, and merge keys (<<) are applied, so the output is fully expanded.
  • YAML comments are dropped, because JSON has no syntax for them.
  • Multi-document streams separated by --- produce an array of documents.
Questions

Frequently asked

Is YAML to JSON conversion lossless?
Values and structure are preserved exactly. Comments and anchors are not, because they are YAML features with no equivalent in the target format — anchors are expanded into the values they reference.
Why convert YAML to JSON?
YAML is the configuration format used by Kubernetes, CI pipelines and Docker Compose, while JSON is the default interchange format for web APIs. Converting is usually about handing data to a tool that only speaks one of them — an API client, for instance.
Is my data uploaded anywhere?
No. Every tool on JSONWorks runs entirely in your browser using JavaScript. Your input is never sent to a server, never logged and never stored. The simplest proof is to disconnect from the internet — the tools keep working. The site does load Google Fonts and a Google Analytics page-view tag, so you will see those two requests in your network tab, but neither receives anything you type or paste.
Related

Tools that pair well with this