JSON to YAML Converter

Convert JSON to YAML online - paste JSON and get clean, valid YAML instantly.

input.json
output.yaml

About JSON to YAML

Convert JSON into YAML - handy for Kubernetes manifests, CI/CD config, and other YAML-based tooling.

🛠️
How to use it
  1. Paste your JSON into the left editor.
  2. Click Convert to YAML.
  3. The YAML output appears on the right - copy it with the clipboard icon.
  4. Click Format on the JSON side first if your input is minified or messy.
💡
Tips & use cases
  • Great for turning a JSON config into a Kubernetes manifest or GitHub Actions workflow file.
  • YAML is whitespace-sensitive - always double check indentation after pasting the result into your own files.

Convert JSON to YAML Online

Paste JSON and get equivalent YAML: objects become indented key: value blocks, arrays become - list items, and quotes are added only where YAML needs them. The data stays exactly the same - only the syntax changes.

🔄

JSON to YAML example

JSON input
{
  "name": "web-app",
  "version": "1.4.0",
  "private": true,
  "replicas": 3,
  "ports": [80, 443],
  "env": {
    "NODE_ENV": "production",
    "API_URL": "https://api.example.com"
  },
  "tags": [],
  "owner": null,
  "build": "2026-09-25"
}
YAML output
name: web-app
version: 1.4.0
private: true
replicas: 3
ports:
  - 80
  - 443
env:
  NODE_ENV: production
  API_URL: https://api.example.com
tags: []
owner: null
build: '2026-09-25'
📐

JSON vs YAML syntax

  • Objects: JSON uses { } and commas; YAML uses indentation and key: value lines.
  • Arrays: JSON uses [ ]; YAML uses one - item per line (empty arrays stay []).
  • Strings: JSON always needs double quotes; YAML only quotes strings that would otherwise be read as another type.
  • Comments: YAML supports # comments; JSON doesn't, so the output starts without any - add your own after converting.
  • Types: numbers, true/false and null carry over unchanged.
📦

Common reasons to convert JSON to YAML

  • Kubernetes manifests and Helm values files
  • GitHub Actions, GitLab CI and other CI/CD pipelines
  • Docker Compose and Ansible configuration
  • OpenAPI / Swagger specs, which are often easier to read in YAML

JSON to YAML FAQ

Why are some values quoted in the YAML output?

Quotes are added when a string would change type without them. In the example, '2026-09-25' is quoted so YAML doesn't read it as a date; strings like "yes", "123" or "null" are quoted for the same reason.

Is the key order preserved?

Yes. Keys appear in the YAML in the same order as in your JSON.

Is JSON valid YAML?

Almost always - YAML 1.2 was designed as a superset of JSON, so most YAML parsers accept JSON as-is. Converting still helps, because indented YAML is far easier to read and edit by hand.

Is my JSON uploaded to a server?

No. The conversion runs entirely in your browser.

How do I convert YAML back to JSON?

Use the YAML to JSON converter.