Runs in your browser — nothing is sent anywhere

YAML ⇄ JSON Converter

Paste YAML or JSON, convert in either direction, get validation errors with line numbers. Config files often contain secrets — this converter never transmits your text.

YAML
JSON

YAML vs JSON: when you need which

YAML and JSON describe the same kind of data — nested maps, lists and scalar values — but they live in different worlds. YAML dominates configuration: Kubernetes manifests, Docker Compose, GitHub Actions workflows, Ansible playbooks and CI pipelines are all written in YAML because it is easy for humans to read and supports comments. JSON dominates data exchange: every programming language parses it natively, every REST API speaks it, and its strict syntax leaves no room for ambiguity.

That split is exactly why conversion comes up daily. You need to feed a YAML config into a tool that only accepts JSON; you want to convert an API response into a readable config; you're debugging a Kubernetes manifest and want to inspect it as JSON with jq. This converter does both directions with full validation — if your YAML has an indentation error, you'll see the line number instead of silently corrupted output.

Configuration files routinely contain database passwords, API keys and internal hostnames. Pasting them into a random online converter sends that data to someone else's server. This page performs the conversion locally in your browser — your text never leaves the tab.

Frequently asked questions

Are comments preserved?
No — JSON has no comment syntax, so comments are dropped when converting YAML to JSON. This is a limitation of the format, not the tool.
Which YAML version is supported?
YAML 1.2 via the widely used js-yaml library — the same behavior you get in most JavaScript tooling.
Does it handle multi-document YAML?
Files with multiple --- documents convert to a JSON array, with one element per document.

Related tools