JSON to YAML Converter

Convert JSON into clean, readable YAML.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

Convert JSON to YAML in your browser

YAML is the config format behind CI pipelines, Kubernetes manifests and Docker Compose, while data and API responses arrive as JSON. This converter turns any valid JSON into clean, readable YAML with consistent two-space indentation, ready to paste into a config file.

How it works

The converter walks the parsed JSON and emits indented YAML:

  • Objects become key: value lines.
  • Arrays become - item entries, nested objects indenting two spaces deeper.
  • Scalars — strings, numbers, booleans, null — are written directly.
  • Safe quoting: a string that could be misread as a number, boolean or YAML keyword (such as "true", "123" or a value containing a colon) is wrapped in quotes so the YAML round-trips back to the same JSON.

Example

This JSON:

{ "name": "demo", "enabled": true, "ports": [80, 443], "version": "1.0" }

becomes:

name: demo
enabled: true
ports:
  - 80
  - 443
version: "1.0"

The ports array became a YAML list, and the string "1.0" was quoted so it is not re-read as a number. The conversion happens entirely in your browser — your config and data are never uploaded or stored.

Ad placeholder (rectangle)