JSON to YAML
Convert JSON into readable YAML for config files, manifests and CI pipelines.
About this tool
JSON is what tools emit and YAML is what people edit, so the gap between the two gets crossed
constantly. A manifest pulled with kubectl get -o json has to go back into the repo
as YAML before anyone will review the diff. A CI provider documents its pipeline in YAML while
the script that generates it produces JSON. An Ansible playbook needs to absorb a block of
variables that arrived as an API response. In all three cases the content is already right and
only the syntax is wrong. Doing it by hand means stripping quotes and commas, re-deriving
indentation from brace depth, and finding out at the next pipeline run that one nested list
landed a level too deep. This JSON to YAML converter takes what you paste and hands back the
equivalent document with the structure intact: objects become mappings, arrays become dash
lists, and numbers and booleans stay unquoted scalars instead of turning into strings along
the way.
YAML earns the extra step. It accepts comments, which JSON has never supported, so the reason behind a replica count or a feature flag can sit next to the value rather than in a commit message someone has to go digging for. It drops the quotes and commas that cause most hand-editing mistakes, and multi-line content — a certificate, a shell script, a long description — reads as itself instead of one line broken up by escape sequences. The conversion runs through js-yaml inside your browser: nothing is uploaded, no server sees the payload, and there is no round trip to wait on, so even a large manifest comes back the moment you press Convert. That is worth something when the JSON holds cluster names, internal hostnames, or a token you have not rotated yet. Indentation is yours to choose between two and four spaces, and long lines fold at 100 characters so the result stays readable in a narrow editor pane.
Frequently asked questions
Is my JSON uploaded anywhere?
No. The conversion runs in your browser through js-yaml, and the page never sends your content over the network. Load the page, disconnect, and it keeps working. That matters when the JSON is a Kubernetes secret, a CI config carrying a deploy token, or an API response with customer records in it.
Why are some strings quoted in the YAML output?
A string that would parse back as something else has to be quoted to stay a string. Values like "42", "true" and "null" get quotes so the round trip is lossless. Older YAML 1.1 parsers also read yes, no, on and off as booleans, so quoting those in hand-written files is a good habit too.
Can it keep the comments from my JSON?
JSON has no comment syntax, so there is nothing in the input to carry across. Comments are usually the reason for moving to YAML in the first place: once you have the converted file, add # lines above the values that need explaining. Converting back to JSON later drops them again, so keep the YAML as the source of truth.
How do I control indentation, and why is the tab option ignored?
Pick two or four spaces and the output re-renders immediately. YAML forbids tab characters for indentation and parsers reject a tab-indented block, so that setting falls back to two spaces rather than producing a file nothing can read. Long lines fold at 100 characters to keep generated manifests readable.