JSON to YAML
Paste JSON, get YAML. Runs entirely in your browser using js-yaml. Supports nested objects, arrays, and all primitive types. Tune flow level, indent, and sort to match your config style.
Paste JSON, get clean YAML
Nested objects become indented blocks. Arrays become bullet lists. js-yaml handles strings, numbers, booleans, null, and Unicode out of the box.
{
"name": "hcodx",
"version": 1,
"tags": ["dev", "tools"],
"owner": {
"name": "Alice",
"email": "alice@example.com"
}
}
name: hcodx version: 1 tags: - dev - tools owner: name: Alice email: alice@example.com
What you'll use this for
YAML is everywhere — Kubernetes manifests, GitHub Actions, Ansible playbooks, OpenAPI specs. Convert from JSON in seconds.
Kubernetes manifests
Convert an API response to a YAML manifest for kubectl apply — preserve structure, lose the curly braces.
GitHub Actions
Copy a workflow JSON from a tool and paste here to get clean YAML for .github/workflows.
Config migration
Move an app from JSON config to YAML for readability — keep the values, change the syntax.
OpenAPI / Swagger
Convert OpenAPI JSON specs to YAML for nicer diffs and review comments.
How to convert JSON to YAML
Paste your JSON
Drop it into the left editor. CodeMirror highlights syntax and reports errors inline.
Pick options
Default indent is 2 spaces with block style. Toggle sort keys or change flow level for compact output.
Click Convert
Or leave auto-convert on for live updates as you type. js-yaml runs locally — no server.
Copy or download
Grab the YAML to clipboard or download as a .yaml file.
Frequently asked questions
Yes. Completely free, no signup, no limits.
No. Conversion runs entirely in your browser. Your data never leaves your device.
Yes. After the first load, the page works without an internet connection.
js-yaml 4.x — the same parser used by Node.js tooling. Loaded once from a CDN, runs locally after that.
By default the converter inlines shared references (the No anchors toggle). Turn it off if you want js-yaml to emit &anchor/*ref for repeated objects.
About this converter
JSON and YAML are two of the most common serialization formats in modern development. JSON is great for APIs (compact, strict syntax). YAML is great for config files (readable, comments, multi-line strings). This tool converts between them losslessly for the JSON subset of YAML.
What's preserved
- Strings — including Unicode, escaped characters, multi-line.
- Numbers — integers, floats, scientific notation.
- Booleans / null —
true/false/null. - Arrays — become YAML bullet lists.
- Objects — become indented YAML blocks.
What's not preserved
- Comments. JSON has no comments to convert. If you want comments in your YAML output, add them after conversion.
- Key order with sort. Enabling Sort keys alphabetizes object keys, which differs from JSON insertion order.