Skip to content

Tools/YAML / TOML/JSON to YAML

JSON to YAML

Paste a JSON object and get YAML with maps and lists. This URL selects JSON → YAML so you do not hunt through the hub dropdowns.

Same converter: all directions · YAML to JSON · TOML to JSON · JSON to TOML

Loading tool…

How to use JSON to YAML

  1. 1. Paste JSON. A single object or array. Invalid JSON shows a parse error.
  2. 2. Confirm JSON → YAML. Source JSON, target YAML.
  3. 3. Copy YAML. Re-indent if your linter wants two spaces.

About this tool

“JSON to yaml” is the direction CI templates and Helm wrappers need when an API already speaks JSON. The hub tool can also emit TOML; this page is only the JSON → YAML pair.

Pretty maps vs JSON keys

Key order follows the JSON object as parsed by the engine. Duplicate keys are invalid JSON and will fail before conversion.

When to stay on JSON

If the consumer is JavaScript, leave it as JSON. Convert to YAML when humans will edit the file in git.

Code examples

Node

import { parse } from "yaml";
parse("name: Ada");

This is one direction of the shared converter. The editor is the same; the title and default direction match this search.

Frequently asked questions

Related tools

All tools