YAML to JSON converter

Paste YAML and get formatted JSON at once, with nested objects, lists and typed values, and a clear message if the YAML is not valid. Nothing leaves your browser.

  • Free
  • No sign-up
  • Runs in your browser
yaml-to-json

100% private — your text is processed in your browser and never sent to any server.

Next step

Keep going with your result in another tool. Nothing is uploaded.

How it works

Paste your YAML

Configuration files, Kubernetes manifests, CI pipelines or OpenAPI specs all work.

Check the JSON

The result is formatted with the indentation you choose.

Copy it

Copy the JSON, or switch direction to go from JSON back to YAML.

How to convert YAML to JSON

To convert YAML to JSON, paste your YAML in the input box with YAML to JSON selected. Indented blocks become nested objects, dashes become arrays, and values such as true, 2 and null become real JSON booleans, numbers and null. If the YAML has a mistake, the tool points to the problem line. The conversion runs in your browser.

A worked example

This YAML mixes a string, a boolean, a number, a list and a nested block:

YAML input

name: UtilsDock
active: true
version: 2
tags:
  - tools
  - free
owner:
  city: Madrid
  since: 2026

JSON output

{
  "name": "UtilsDock",
  "active": true,
  "version": 2,
  "tags": [
    "tools",
    "free"
  ],
  "owner": {
    "city": "Madrid",
    "since": 2026
  }
}

Where you need this conversion

  • Kubernetes, Docker Compose and GitHub Actions files are YAML, while their APIs and many tools speak JSON.
  • OpenAPI specs are often written in YAML and consumed as JSON by generators and validators.
  • Config files that have to be loaded by code that only has a JSON parser.

YAML gotchas

  • Indentation defines the structure and must use spaces, never tabs.
  • Unquoted values are guessed: yes, no and on may be read as booleans by some parsers, and 1.0 as a number. Quote them to keep text.
  • Comments start with # and are dropped, because JSON has no comments.
  • Anchors and aliases are resolved, so repeated blocks are written out in full.

Private by design

The conversion runs in your browser. What you type, paste or drop is never uploaded, which matters when the text holds tokens, personal data or internal files.

Frequently asked questions

Is every YAML file valid JSON afterwards?
Yes, as long as it is valid YAML. Features that JSON lacks, such as comments and anchors, are removed or expanded.
Can I convert JSON back to YAML?
Yes. Switch the direction in the same tool, or use the JSON to YAML converter.
Are multiple YAML documents supported?
The tool converts a single document. If your file has several separated by ---, convert them one at a time.
Is this converter free?
Yes. There is no sign-up and no limit, and it runs in your browser, so nothing you type is sent to a server.
Does it work on a phone?
Yes. It works in any modern mobile browser, and the result updates as you type.