YAML to JSON converter.

Convert YAML to JSON instantly in your browser. Fast, free, and designed for developers.

Processed in your browserNo upload, no signup

YAML input

0 lines · 0 chars

JSON output

0 lines · 0 bytesIndent: 2 spaces
Your input is processed locally and isn't uploaded for conversion. Verify by opening DevTools → Network — there are no requests carrying your YAML.

YAML to JSON examples.

A few real inputs and the JSON the converter produces. Click Example in the editor to load a richer sample.

// Simple object

name: John
age: 25
active: true
{
  "name": "John",
  "age": 25,
  "active": true
}

// Nested object

user:
  name: John
  address:
    city: New York
    country: USA
{
  "user": {
    "name": "John",
    "address": {
      "city": "New York",
      "country": "USA"
    }
  }
}

// Array of items

languages:
  - JavaScript
  - Python
  - Go
{
  "languages": [
    "JavaScript",
    "Python",
    "Go"
  ]
}

What is YAML?

YAML is a human-friendly data serialization format used for configuration, CI pipelines, and Kubernetes manifests. It uses indentation (no braces or brackets) to express structure and supports maps, sequences, scalars, anchors, and multiline strings.

What is JSON?

JSON is the lingua franca of web APIs. It's strict about quoting strings and has only six value types — object, array, string, number, boolean, and null. Every YAML document can be expressed as JSON, but not the other way around.

YAML vs JSON.

YAML optimises for humans. JSON optimises for machines. YAML allows comments and anchors; JSON does not. YAML is whitespace-sensitive; JSON uses explicit and [ ]. When you convert from YAML to JSON, comments are dropped and YAML's flexible scalars (unquoted strings, dates) are emitted as proper JSON types where possible.

How to convert YAML to JSON.

  1. Paste your YAML into the left panel (or load the example).
  2. The converter runs on every keystroke — you should see JSON on the right immediately.
  3. Copy or download the result. To go the other way, click To YAML.

Common YAML conversion errors.

// Mixed indentation

user:
 name: John
  age: 25

YAML requires consistent indentation. The line above mixes two and four spaces, which is a parse error.

// Missing colon

title YAML without a colon

Every key in a mapping needs a : separator. Without one, YAML reads the line as a plain scalar and skips it.

// Tab characters

key:\tvalue

YAML forbids tabs for indentation. Use spaces only. Most editors convert tabs to spaces automatically — but a stray one will break the file.

// Unsupported syntax

This converter supports the core YAML 1.2 spec. Custom tags and esoteric directives are not parsed.

Frequently asked questions.

Is my YAML sent to a server?

No. The conversion runs entirely in your browser using JavaScript. Open the network tab and you will see no request carrying your input.

Does the converter preserve comments?

JSON has no comment syntax, so comments are dropped during conversion. The structure, types, and ordering of values are preserved.

What happens if my YAML is invalid?

You will see an error message with the exact line and column where the parse failed, plus a hint describing the most likely fix. Your input is preserved so you can correct it.

Can I upload a .yaml or .yml file?

Yes. Drag a file into the input panel or use the upload button. Everything stays on your device.

How big a YAML file can I convert?

There is no fixed limit, but very large files may briefly pause the UI while converting. Use the download button to save the resulting JSON.

Is YAML to JSON conversion safe?

Yes — and the strongest guarantee of safety is that your data never leaves your browser. We don't run servers for conversion and we don't log your input.

Related tools.