YAML to JSON
JSON
YAML
Empty Runs in your browser

JSON to YAML Converter Online - Free & Private

Paste JSON and get YAML ready for Kubernetes manifests, Docker Compose, CI pipelines or any other config file. Choose the indentation, and optionally sort keys so the output is easy to compare.

How to convert JSON to YAML

  1. Paste JSON into the left editor, or open or drop a .json file.
  2. YAML appears on the right with syntax highlighting. If the JSON has an error, the status line shows the line and column so you can fix it.
  3. Copy the YAML or download it as a .yaml file.

Why convert JSON to YAML?

YAML is a superset of JSON that drops most of the braces, brackets and quotes, which makes it easier for people to read and edit. That is why Kubernetes, Docker Compose, GitHub Actions, GitLab CI, Ansible and OpenAPI files are usually written in YAML. A common workflow is to take a JSON response or a generated config and turn it into a YAML file you can commit and review.

What the output looks like

Options

Example

{"service":{"image":"nginx","ports":["8080:80"]}} becomes:

service:
  image: nginx
  ports:
    - 8080:80

Use the YAML to JSON converter to go back.

Private by design

Config files often hold hostnames and secrets, so the conversion runs only in your browser. Nothing you paste is sent to a server.

Frequently asked questions

How do I convert JSON to YAML?

Paste JSON into the left editor or open a .json file. The YAML appears on the right. Choose the indentation and whether to sort keys, then copy or download the .yaml file.

Is YAML a superset of JSON?

Yes. YAML 1.2 is a superset of JSON, so any JSON document is also valid YAML. Converting to YAML style removes most quotes, braces and brackets to make the file easier for people to read.

Can I use the output in Kubernetes or Docker Compose?

Yes. The output is standard YAML with two-space indentation by default, which is what Kubernetes manifests, Docker Compose files and GitHub Actions workflows expect.

Why are some strings quoted in the YAML?

Values such as "yes", "no", "on", "08" or "null" would be read back as booleans, numbers or null if left unquoted, so they keep their quotes to stay strings.

Editor settings

Type

{
  "id": 1024, "name": "Ada", "active": true,
  "tags": ["0O", "1lI", "=> != >="], "manager": null
}

Colour theme

Code editor

Defaults

Send feedback

How is online-json working for you?