JSON to YAML

Convert JSON to clean, readable YAML instantly. Handles nested objects, arrays, strings, numbers, and booleans. Free, private, runs entirely in your browser.

100% private · runs locally

Paste any JSON object or array and get properly indented YAML in seconds. Strings that contain special characters are automatically quoted, numbers and booleans are preserved as native YAML scalars, and nested structures are represented with clean block notation.

JSON input
YAML output YAML

Related tools

Frequently asked questions

What is YAML and when should I use it instead of JSON?

YAML is a human-readable data serialization format commonly used for configuration files (Docker Compose, Kubernetes, GitHub Actions, Ansible). It is a superset of JSON and supports comments, which JSON does not. Use YAML when the file will be edited by humans; use JSON when it will be consumed by APIs or parsed programmatically.

When does the converter add quotes around string values?

A string is quoted if it could be misinterpreted by a YAML parser: values that look like booleans (true, yes), numbers, or null; strings containing special characters like :, #, or [; and strings with leading or trailing whitespace.

How are nested objects and arrays represented?

Nested objects use block mapping with two-space indentation. Arrays use block sequence notation with - prefixes. Arrays of objects have their first key on the same line as the dash for compact output, with remaining keys indented beneath.

Is the output valid YAML?

Yes. The converter produces YAML 1.2 compatible block-style output. It does not use flow style or YAML-specific features like anchors or aliases, so the output is broadly compatible with all major YAML parsers including js-yaml, PyYAML, and Go's gopkg.in/yaml.v3.