{ jsonzen }0 bytes uploaded

JSON ↔ YAML

Convert JSON to YAML and back. Runs in your browser.

<5ms🔒client-only
Inputpaste ⌘V
Paste JSON here…
Output
Auto-runs on paste⌘↩
Tip: press Ctrl + Enter to re-run, or paste a large JSON to auto-format.
// EXAMPLES
// HOW IT WORKS

JSON → YAML uses js-yaml.dump() to produce human-readable YAML with proper indentation. YAML → JSON uses js-yaml.load() then re-serializes with JSON.stringify. Both directions run in your browser.

// FAQ

When should I use YAML vs JSON?

YAML is more human-readable for configs (Kubernetes, GitHub Actions, etc.). JSON is better for APIs and machine-to-machine. Many tools accept both.

Does this preserve comments?

No — JSON has no concept of comments. If your YAML has comments, they'll be stripped in conversion. Use a dedicated YAML editor for comment preservation.

What about YAML anchors and references?

js-yaml expands anchors/references when parsing. The JSON output will have the values inlined.