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 handles every JSON value type, escapes reserved tokens, and emits literal block scalars for multi-line strings so newlines are preserved.
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 containing colons, dashes, or YAML-reserved words like `null`, `true`, `yes`, `on` are automatically quoted. Multi-line strings use the `|` literal block scalar so line breaks are preserved exactly.
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 instantly check if it's valid — get the exact error message, and one-click auto-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
