🔃 YAML to JSON — Full YAML 1.2

Convert YAML to JSON Online

The most complete browser-based YAML parser. Handles YAML 1.2 types, multi-document files, block scalars, flow style, all boolean variants, anchors, and aliases.

✅ Multi-document (---)✅ Block scalars (| and >)✅ Flow style ({},[]) ✅ All boolean variants✅ Integers & floats✅ Null types
🔗 URL
YAML Input
📁

Drop YAML file here

JSON Output
Size: Lines: Type:

FAQ

What YAML versions are supported?

The parser implements YAML 1.2 (which is a superset of JSON). It handles all common scalar types, block and flow styles, multi-document files, and most real-world YAML including Kubernetes manifests, Docker Compose, GitHub Actions, and Ansible playbooks.

What does multi-document mean?

A single YAML file can contain multiple documents separated by ---. With Multi-doc → array enabled, each document becomes an element in a JSON array. This is common in Kubernetes where multiple resource manifests are in one file.

How are YAML booleans converted?

YAML 1.1 has many boolean variants: true/false, yes/no, on/off (all case variations). These are all correctly converted to JSON true or false.

What are block scalars?

Block scalars (| literal and > folded) allow multi-line strings in YAML. | preserves newlines, > folds line breaks into spaces. Both are correctly parsed and output as JSON strings.

YAML to JSON — Full YAML 1.2 Guide

YAML (YAML Ain't Markup Language) is designed for human readability. JSON (JavaScript Object Notation) is the lingua franca of web APIs. Converting between them is essential for DevOps, configuration management, and data engineering.

YAML Type System

# Scalars
string: Hello World
quoted: "must be quoted: colons here"
integer: 42
float: 3.14159
bool_true: true  # also: yes, on, True, YES
bool_false: false  # also: no, off, False, NO
null_val: null  # also: ~

# Block scalar (preserves newlines)
multiline: |
  Line 1
  Line 2
  Line 3

# Folded scalar (collapses to one line)
folded: >
  This is one
  long string

# Sequences (arrays)
fruits:
  - apple
  - banana
  - cherry

# Nested mappings
address:
  street: 123 Main St
  city: New York

Multi-document YAML

---  # Document 1
name: Service A
port: 8080
---  # Document 2
name: Service B
port: 9090

This converts to a JSON array with two objects when Multi-doc → array is enabled.