JSON tool
JSON to YAML — free online tool
Convert any JSON document to YAML 1.2 in your browser — proper quoting, nested objects and arrays, multi-line strings.
What does this do?
YAML is a human-friendly serialization format used by Kubernetes manifests, Docker Compose, GitHub Actions, Ansible, and many config files. It supports the same data shape as JSON but with cleaner syntax. This converter uses js-yaml, the library behind most JavaScript YAML tooling, so reserved words, numbers-as-text and multi-line strings are quoted or block-formatted exactly as YAML parsers expect. Combine it with a JSONPath query to convert just part of a document.
When to use it
- ▸Convert API responses into Kubernetes / Docker Compose configs
- ▸Translate `package.json` snippets to a CI workflow
- ▸Reformat JSON test fixtures as readable YAML
- ▸Migrate config files from JSON to YAML
Tip
Empty objects/arrays render as `{}` / `[]`. Strings that YAML would read as something else — `"true"`, `"null"`, `"2026-01-15"`, `"#fff"` — are quoted, and multi-line strings use the `|` block style so line breaks are preserved. For YAML → JSON, multi-document files and indentation options, use the YAML ⇄ JSON tool.
Example: API response → YAML config
Input — JSON
{
"name": "elefcode",
"version": "1.0.0",
"ports": [80, 443],
"env": {
"NODE_ENV": "production",
"LOG_LEVEL": "info"
},
"tags": ["web", "api", "edge"]
}Output
name: elefcode version: 1.0.0 ports: - 80 - 443 env: NODE_ENV: production LOG_LEVEL: info tags: - web - api - edge
More JSON tools
JSON to XML
Convert any JSON document to well-formed XML in your browser — proper entity escaping, nested elements, attributes via the `@` prefix.
JSON to CSV
Turn a JSON array of objects into a clean CSV file — perfect for Excel, Google Sheets, BigQuery, or any database import.
JSON Validator
Paste any JSON to check that it's valid — get the line, column and a plain-English reason for the first error, and one-click repair for the common mistakes.
JSON Minifier
Shrink any JSON to the smallest valid form — strip every byte of whitespace, indentation, and line breaks while keeping the value identical.
Full JSON editor →
Pretty · Minify · Tree · YAML · XML · CSV · Schema · JSONPath · auto-repair
