InTab

YAML ↔ JSON

Paste YAML or JSON and convert in this tab. Errors point at the line and column. Nothing is uploaded.

Tool input stays in your browser

Did you know · Encoding

URL-safe Base64 swaps + and / for - and _ so the value survives inside a query string.

YAML

you edit

JSON

read only
Converted output appears here.

Why two formats for the same data

Kubernetes manifests, GitHub Actions, and Docker Compose are YAML. Most APIs and the rest of this hub speak JSON. The conversion is structural: maps become objects, lists become arrays, scalars keep their types. Comments in YAML are dropped on the way to JSON because JSON has no comment syntax. Going the other way, JSON keys stay quoted only when YAML needs them to.

Parsing uses the yaml library in this page's JavaScript bundle. It is not a round-trip pretty-printer that preserves every comment and anchor; it is the conversion you want when a CI file has to become a JSON fixture, or a JSON API sample has to become a values.yaml sketch.

Minify, swap, and errors

YAML → JSON can emit indented JSON or a single minified line. Use as input flips direction so you can convert, tweak, and convert back. Invalid JSON reuses the same line/column recovery as the JSON formatter. Invalid YAML reports the parser's line and column when it has them.

Why it is private

Conversion runs as JavaScript inside this page. Open DevTools, switch to the Network tab, and paste a values file with secrets: no request carries that document. That matters because YAML in this context is often Helm values, deploy configs, and environment maps.

YAML to JSON FAQ

YAML to JSON, JSON to YAML, comments, parse errors, and converting in the browser without upload.

How do I convert YAML to JSON?

Paste YAML, keep YAML → JSON, and copy the output. This YAML to JSON converter pretty-prints JSON or minifies it. Parse errors include line and column. Conversion runs in the browser; comments in YAML are dropped because JSON has no comment syntax.

How do I convert JSON to YAML?

Switch to JSON → YAML, paste JSON, and copy the YAML. Invalid JSON is reported with the same line/column recovery as the JSON formatter. Use as input flips direction so you can round-trip a sketch (comments are not preserved).

What is a YAML to JSON converter?

It maps YAML maps to JSON objects, lists to arrays, and scalars to JSON types. This yaml json converter is for CI files, Helm values, and API fixtures — not a comment-preserving pretty-printer. Nothing is uploaded.

Does YAML to JSON keep comments?

No. JSON cannot represent YAML comments or all anchor/alias layouts. If you need comments, keep the YAML source of truth and generate JSON as an artifact.

Is the YAML converter private?

Yes. The yaml library runs in this page’s JavaScript. Secrets in values.yaml stay in the tab.