YAML to JSON converter.
Paste YAML on the left, get JSON on the right. Free, instant, and private — the conversion runs entirely in your browser, so nothing is uploaded anywhere.
Converting a Kubernetes manifest stream? Multi-document YAML (--- separators) converts to a JSON array — one element per document. Anchors and merge keys are expanded automatically.
Going the other way? JSON to YAML converter →
Do more with the JSON you just made
Converting YAML to JSON is usually step one — the real work is reading what's inside. The jsonbolt desktop app is a GPU-accelerated JSON viewer: it opens clipboard JSON with one keystroke, parses at 3 GB/s, and searches 20 million results a second, on documents far bigger than a browser tab can hold.
Copy the JSON
One click on Copy above — or copy JSON from a terminal, an API client, a log file.
Press Win + J⌃ ⌥ J
jsonbolt launches and opens your clipboard in one step — even a 1 GB payload renders instantly. (Opt-in: Settings → Launch.)
Explore & export
Search the tree, extract any subtree by path, and export the selection as CSV, XML — or back to YAML.
Free for personal use — no signup. YAML, CSV, and XML export are built in.
YAML to JSON: what actually changes
YAML and JSON describe the same data structures — mappings, sequences, and scalars — so converting is re-serializing, not translating. What YAML adds for humans (comments, anchors, unquoted strings) has no JSON equivalent, so the converter resolves all of it into plain, portable JSON that any parser accepts.
| YAML feature | What the JSON gets |
|---|---|
Comments (# …) | Dropped — JSON has no comment syntax. |
Anchors & aliases (&name / *name) | Expanded — every alias becomes a full copy of the anchored value. |
Multi-document streams (---) | A JSON array with one element per document. |
| Unquoted scalars | Typed by the YAML 1.2 rules: true, null, and numbers convert; almost everything else stays a string. |
Block scalars (| and >) | JSON strings with \n escapes. |
Why convert at all? JSON is the interchange format: APIs, databases, jq, and every programming language parse it natively and unambiguously. YAML is for files humans edit; the moment a machine needs the data, JSON is the safer handoff.
How this converter handles the details
- Strict, spec-compliant parsing — a full YAML parser runs locally on this page, not a regex approximation. Tabs in indentation, duplicate keys, and bad nesting produce a precise error with the line and column.
- Output is pretty-printed JSON with two-space indentation, keys in document order.
- YAML 1.2 typing: unquoted
true/false/nulland numbers become real JSON types;yes,no, and version-like strings such as1.2.3stay strings. - Values JSON can't represent:
.infand.nanbecomenull— JSON has no infinity. Dates stay as strings, unchanged. - Everything runs locally. The parser is bundled with the page; your data never leaves the tab.
FAQ
How do I convert YAML to JSON?
Paste your YAML into the input pane at the top of this page. The JSON equivalent appears instantly in the output pane — copy it to your clipboard or download it as a .json file. The conversion runs locally in your browser.
Is my YAML uploaded to a server?
No. The converter runs entirely in your browser using a bundled YAML parser. Your data never leaves your machine, so it's safe to convert files that contain secrets, tokens, or internal config.
What happens to YAML comments and anchors in JSON?
Comments are dropped — JSON has no comment syntax. Anchors and aliases (& and *) are expanded, so every alias becomes a full copy of the anchored value in the JSON output. Hit Sample above to see both in action.
Can I convert multiple YAML documents at once?
Yes. A stream with --- separators (common in Kubernetes manifests) converts to a JSON array with one element per document. A single document converts to a single JSON value.
Are .yml and .yaml the same?
Yes — same format, two file extensions. The YAML project recommends .yaml; .yml survives from tools that required three-letter extensions. Kubernetes, GitHub Actions, and docker-compose accept both.
How do I explore a large JSON file after converting?
Copy the JSON output and press Win + J⌃ ⌥ J — the jsonbolt desktop app launches and opens your clipboard instantly. It parses at 3 GB/s, searches 20 million results per second, and can extract any subtree or export it as CSV, XML, or YAML.