Convert JSON to YAML (and back)
Convert a JSON object to YAML, or a YAML file to JSON.
How it works
This tool is aimed mainly at Kubernetes manifests, docker-compose.yml files and CI/CD tool configurations, which are almost always written in YAML. To handle this kind of file with a script (reading a value, transforming it, generating a manifest dynamically), it's often simpler to work in JSON: paste your YAML and click "YAML → JSON" to get a directly usable structure. In the other direction, "JSON → YAML" converts a JSON object generated by a script into readable YAML, ready to drop into a configuration file.
Does the generated YAML follow the usual indentation?
Yes, the conversion produces YAML with standard two-space indentation, including nested lists and objects. The result is valid YAML, but the formatting (key order, indentation style) may differ slightly from a hand-written file.
Are YAML comments preserved?
No. JSON has no notion of comments, so in a YAML → JSON → YAML conversion, any comment in the original YAML is lost — only the structured data (keys, values, lists) is preserved.
100% local processing: conversion runs entirely in your browser thanks to WebAssembly — your configuration is never sent to a server.