JSON and YAML: the same data, written differently
YAML represents the same data as JSON but without braces, brackets or extra quotes: indentation marks the structure. That's why Kubernetes, Docker Compose, Ansible, GitHub Actions and many config files use it.
This tool converts JSON to YAML and keeps the order of the keys. It adds quotes only where they're needed so a value doesn't change type: a string like "10001", "true" or "yes" stays quoted so YAML doesn't read it as a number or a boolean.
You can choose 2- or 4-space indentation. Very long integers are kept in full.
How to convert JSON to YAML
- Paste the JSON or open a .json file.
- Pick the indentation: 2 or 4 spaces.
- Click “Convert to YAML”.
- Copy the result or download it as a .yaml file.
When to use it
- Turning a Kubernetes manifest you have in JSON into YAML.
- Writing a Docker Compose or GitHub Actions config from a JSON example.
- Converting an OpenAPI/Swagger spec from JSON to YAML.
- Making a long config file easier to read.
Frequently Asked Questions
Which YAML version does it output?
YAML 1.2, compatible with the usual libraries and tools (js-yaml, PyYAML, Kubernetes, Docker Compose).
Why are some strings quoted?
Because without quotes YAML would read them as a different type: "123" would be a number, "true" or "yes" a boolean and "null" an empty value. The quotes keep the value exactly as it was in the JSON.
Can I go back from YAML to JSON?
Yes, with the YAML to JSON converter. A round trip gives you the same data.
Is my data sent to a server?
No. Everything is processed in your browser with JavaScript. The text you paste and the files you open never leave your device, so you can safely work with internal or customer data.
Is it free?
Yes. You can try the tool for free on one document (pasted or a single file) and change the options as often as you like; attempts that end in an error don't use up your free try. For unlimited use and processing several files at once, ToolStudio Pro costs €1.99 a month and includes every tool.