A YAML ↔ JSON converter that respects the spec.
Convert between YAML and JSON in your browser using js-yaml — full YAML 1.2 support, precise error reporting with line and column. The two formats describe the same data; switch representations without leaving the page.
Parsing runs entirely in this browser tab via js-yaml (the de-facto YAML 1.2 implementation for JavaScript) and the native `JSON.parse`. No data is uploaded; we never see what you convert.
A spec-compliant parser, and the affordances people actually use.
A converter that handles real-world YAML — anchors, multi-document streams, block scalars — without surprises, and emits clean JSON that round-trips through other tools.
Backed by js-yaml: anchors and aliases (`&foo` / `*foo`), block and flow scalar styles, explicit tags (`!!str`, `!!int`, `!!timestamp`), multi-document streams (`---` / `...`). The full spec, not the YAML-ish subset.
YAML → JSON parses the document tree and emits canonical JSON. JSON → YAML walks the same tree and emits idiomatic block-style YAML. Round-trip is lossless for the JSON-representable subset of YAML.
When YAML parsing fails, the message includes line and column. "Bad indentation at line 17, column 5" beats "syntax error" every time — and matches what `kubectl apply -f` would tell you about the same file.
Pretty-print JSON with 2 or 4 spaces. YAML output always uses 2 spaces (the spec's recommendation) — what every linter and most kubernetes manifests use.
Every keystroke triggers a re-parse and re-emit. Manifests up to a few thousand lines stay responsive.
One click for the system clipboard or a `.json`/`.yaml` file. The download extension matches the direction so the receiving tool picks the right parser.
JSON emission uses `JSON.stringify` — exact RFC 8259 conformance, same output as `jq -r` or `JSON.stringify` on a server.
Use anonymously, on as many manifests as you want. No account, no history, no telemetry. Inspect the network tab — there is nothing outbound.
Wherever YAML and JSON meet the same data.
You have a Kubernetes manifest in YAML and need to POST it to a controller API that wants JSON. Paste in, copy out, send the request. No `kubectl --dry-run -o json` ritual.
Helm values are YAML; Terraform variables are JSON-like HCL. The data is the same — paste from one, copy to the other for a quick rewrite.
CI configs in YAML get unwieldy; converting to JSON makes nested structure obvious in one read. Useful when debugging "why did the job not run on this branch".
OpenAPI specs ship in either format. Tools that generate clients usually want JSON; humans usually want YAML. Convert as needed without a Node script.
When `kubectl apply` complains about indentation, paste the file here for the same parser's line/column error message — sometimes more readable than kubectl's.
Your tool of choice picked the other format. Most config schemas (Prometheus, Caddy, GitHub Actions) accept either — convert once, commit, move on.
YAML ↔ JSON, the plain answers.
YAML 1.2 is a superset of JSON — every valid JSON document is valid YAML, but not vice versa. YAML has features (anchors, aliases, multi-document streams, custom tags) that have no JSON equivalent; converting YAML → JSON drops these. For the JSON-representable subset, round-trip is lossless. For everything else, you lose YAML semantics on the JSON side.
js-yaml parses YAML 1.2 by default. The biggest practical difference is the "Norway problem" — in YAML 1.1, the bare word `no` is a boolean `false`, so the ISO code for Norway in a list would parse wrong. YAML 1.2 (and this tool) treat bare strings as strings unless they match the explicit boolean literals (`true`/`false`).
Three reasons: (1) YAML allows multiple equivalent syntaxes for the same data (flow vs block, single vs double quotes); the emitter picks one canonical form. (2) Comments are not part of the document tree, so they are lost on round-trip. (3) Key order is preserved by the parser, but the emitter may normalize unicode escapes or trailing newlines. The semantic content is identical; the textual form is normalized.
No. Parsing and emitting run entirely in this browser tab via js-yaml and `JSON.stringify`. The page makes no network calls related to your input. Open DevTools → Network and watch nothing happen.
js-yaml parses them — the resulting tree has the alias replaced by a reference to the anchored value. When emitting back to YAML, js-yaml can re-emit anchors for repeated references; when emitting to JSON, the data is materialized inline (JSON has no reference primitive). For complex DAG-shaped YAML, the JSON output will be larger.
Effectively no for typical configs (a Kubernetes manifest is a few KB). Multi-MB YAML files stay responsive but the live re-parse on every keystroke starts to feel noticeable past ~500 KB. For really big files, use a CLI tool like `yq` or `js-yaml` directly.
Deploying real infrastructure with YAML you trust?
Sign up for the free tier and you get $100 in credits, plus VMs with Kubernetes-compatible manifests, managed databases, object storage, and zero-config autoscaling across four regions.