YAML to JSON Converter

Convert YAML to JSON as you type.

How to convert YAML to JSON

  1. Paste or type YAML into the left box. The JSON appears on the right as you type.
  2. Choose an indent of 2 spaces, 4 spaces or tabs for the JSON output.
  3. Select Copy, or Download to save the result as converted.json.
  4. Use Swap to open the JSON to YAML converter with your JSON already filled in.

Indentation mistakes are the most common YAML problem; when the input does not parse, the status line shows the line and column where the parser gave up. Everything runs in your browser and nothing is uploaded.

Example

This YAML:

name: tinydev
version: 2
features:
  - yaml
  - json
owner:
  name: Ada
  active: true

becomes this JSON:

{
  "name": "tinydev",
  "version": 2,
  "features": [
    "yaml",
    "json"
  ],
  "owner": {
    "name": "Ada",
    "active": true
  }
}

Frequently asked questions

What happens to comments, anchors and aliases?

JSON has no comments, so YAML comments are dropped. Anchors (&name), aliases (*name) and merge keys (<<) are resolved, so the JSON contains the full copied values.

What if my file has several documents?

A YAML stream with several documents separated by ---, as in many Kubernetes files, is converted to a JSON array with one element per document.

Are values like yes, no and dates converted?

The converter follows YAML 1.2, the current version. Only true and false are booleans, soyes and no stay strings, and dates such as 2026-01-31 stay strings too, which is what JSON needs.