JSON to YAML and YAML to JSON Converter
Convert between JSON and YAML in either direction — YAML to JSON or JSON to YAML. Handles nested objects, arrays, anchors, and multi-line strings. Runs entirely in your browser.
How to use
- 1Pick a direction
JSON → YAML or YAML → JSON. The Swap button flips it.
- 2Paste your input
Anything from a snippet to a multi-MB config file.
- 3Copy the output
Live update. Parse errors show inline with line numbers.
- 4Share via URL
Your input travels in the address bar so the recipient sees the exact same conversion.
Examples
{"name":"toolvaults","tools":104,"tags":["dev","text","color"]}name: toolvaults tools: 104 tags: - dev - text - color
server: host: 0.0.0.0 port: 8080 features: - auth - metrics
{
"server": {
"host": "0.0.0.0",
"port": 8080
},
"features": ["auth", "metrics"]
}defaults: &defaults timeout: 30 dev: <<: *defaults debug: true
{
"defaults": {"timeout": 30},
"dev": {"timeout": 30, "debug": true}
}Frequently asked
For structured data (objects, arrays, scalars) — yes. YAML-specific things like comments, anchors, and merge keys are lost when going YAML → JSON since JSON has no equivalents. JSON → YAML → JSON is safe.
YAML 1.2 via the mature `yaml` npm package, running fully in your browser. Anchors, aliases, and merge keys are resolved at parse time and flattened into plain JSON.
It takes the current output, uses it as the new input, and flips direction. Useful for round-trip testing or quickly editing the converted result.
Anything up to a few MB. Parsing happens entirely in the browser, so there is no upload — larger inputs are limited only by your device.
Comments are lost — JSON has no equivalent. Everything else (structured data, scalars, nested objects, arrays) round-trips cleanly.
Related tools
- JSON FormatterFormat, validate, and minify JSON in your browser. See parse errors with line/co
- YAML FormatterFormat and validate YAML in your browser. Multi-document (---) supported. Errors
- Base64 Encode / DecodeEncode or decode Base64 text. UTF-8 safe by default. Optional URL-safe variant.
- CSV ↔ JSON ConverterConvert CSV data to JSON (or JSON to CSV) with configurable delimiter, header ro
- Query String ↔ JSONConvert URL query strings to JSON and JSON back to a query string. Handles repea