📝 JSON to YAML — Free & Instant

Convert JSON to YAML Online

Transform JSON into clean YAML for Kubernetes manifests, Docker Compose, Ansible playbooks, and other config files. Block or flow style, custom indentation.

Block & flow styleCustom indentNull handling100% private
JSON Input
📁

Drop JSON file here

YAML Output
Size: Lines:

FAQ

When should I use YAML over JSON?

YAML is more human-readable, supports comments, and is the preferred format for configuration files (Kubernetes, Docker Compose, Ansible, GitHub Actions). JSON is better for API responses and data interchange.

Does YAML support all JSON types?

Yes. JSON is technically a subset of YAML 1.2. All JSON strings, numbers, booleans, nulls, arrays, and objects have direct YAML equivalents.

What does "--- document separator" do?

Adds --- at the top of the output, which marks the start of a YAML document. Required when the YAML will be part of a multi-document stream.

Why are some strings quoted in YAML?

YAML has reserved values like true, false, null, yes, no. If a string matches these, it must be quoted. Enable Quote strings to always wrap strings in double quotes.

JSON to YAML — Complete Guide

YAML (YAML Ain't Markup Language) is a human-friendly data serialization format. Unlike JSON, YAML uses indentation to represent structure, supports comments, and is the default configuration language for many DevOps tools.

Basic Type Mapping

JSON → YAML
{"name":"Alice","age":30,"active":true,"tags":["dev","ops"]}

name: Alice
age: 30
active: true
tags:
  - dev
  - ops

When to Use YAML