What this tool does
YAML is the format behind Docker Compose files, Kubernetes manifests, GitHub Actions workflows and many config files. If your data is in JSON, this tool rewrites it as readable, indented YAML in one click.
How to use it
Paste valid JSON on the left, pick 2 or 4 space indentation, and press Convert. Copy the result or download it as a .yaml file.
Example
JSON input:
{"service":"web","image":"nginx:latest","debug":"false","replicas":3}
YAML output:
service: web image: nginx:latest debug: "false" replicas: 3
The text value "false" is wrapped in quotes so YAML does not read it as a true or false value, while the number 3 stays unquoted.
Is my data safe?
Yes. The conversion happens in your browser with JavaScript. Nothing is sent to a server.
What gets quoted?
Strings that YAML could misread, such as "true", "null", numbers written as text, or text containing a colon followed by a space, are automatically wrapped in quotes so the meaning stays the same.
Frequently asked questions
What is the difference between JSON and YAML?
Both store structured data. JSON uses braces, brackets and quotes and is strict, which makes it easy for programs to read. YAML uses indentation and is designed to be easier for people to read and edit, which is why many config files use it.
Can I use the output in Docker Compose or Kubernetes?
The output is standard YAML, so yes, as long as your JSON already has the structure the tool expects, such as a services key for Docker Compose. The converter changes the format, not the meaning of your data.
Should I choose 2 or 4 spaces?
Both are valid YAML. Many Docker, Kubernetes and GitHub Actions files use 2 spaces, but follow the style your project already uses.
Are comments kept?
JSON has no comments, so the YAML output has none either. You can add comments to the YAML file yourself afterwards.
Can I convert YAML back to JSON?
This page converts JSON to YAML only.
Related tools
Check your input with the JSON Formatter first if the conversion fails. Compare two versions with JSON Diff or combine files with Merge JSON. You can also turn an array of objects into a spreadsheet with JSON to CSV.