ToolStudio.es
In your browser1 Free Trial

Convert JSON to YAML

Turn JSON into clean, readable YAML for Kubernetes, Docker Compose, GitHub Actions or any config file.

Free try: process 1 document (pasted or 1 file) and change the options as often as you like. Errors do not use up your try.
Input · JSON

Everything runs in your browser: your data is never sent to a server.

Result · YAML
Indentation

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

  1. Paste the JSON or open a .json file.
  2. Pick the indentation: 2 or 4 spaces.
  3. Click “Convert to YAML”.
  4. 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.

Related tools

Development

YAML to JSON Converter

Convert YAML to JSON, including anchors, aliases and several documents separated by “---”. If the YAML has an error, it shows the line and column.

YAMLJSON
Try this tool
Development

JSON Formatter

Paste minified or messy JSON and get it back indented with 2 or 4 spaces or tabs, with sorted keys if you want. Any error is shown with its line and column.

JSON
Try this tool
Development

JSON to XML Converter

Convert JSON to XML: each key becomes an element, lists repeat the element and “@name” keys become attributes. Special characters are escaped and invalid names fixed.

JSONXML
Try this tool
Development

JSON Validator

Validate JSON against the RFC 8259 standard with every error explained in plain words: trailing commas, single quotes, unquoted keys or comments. It also flags duplicate keys.

JSON
Try this tool
Featured on TinyShelf