Skip to content
</>Inblix Dev ToolsAll tools

JSON to YAML Converter Online

Paste JSON on the left and get clean, properly indented YAML on the right. Useful for Kubernetes manifests, GitHub Actions workflows, and Docker Compose files, where YAML is preferred over JSON.

How it works

YAML is a superset of JSON, so anything this tool produces can be read back by a JSON parser, but the reverse is not true: YAML supports anchors, multi-document streams, and unquoted keys that JSON cannot express. Converting one direction and back is lossless only for the plain data subset.

The main practical reason to convert JSON to YAML is configuration. Kubernetes manifests, GitHub Actions workflow files, and most Docker Compose setups are all authored in YAML because it is far more readable when you are writing by hand and reviewing in a pull request. A JSON blob produced by an API or a CLI output is usually the machine-generated starting point.

This converter quotes strings that would otherwise be ambiguous. YAML reads unquoted `true`, `false`, `yes`, `no`, `on`, `off`, and `null` as booleans and null rather than strings, so a JSON value of the string "yes" has to be quoted to survive the round trip. Strings with leading or trailing whitespace, or characters like `#`, `:`, and `-` at the start, are quoted for the same reason.

Empty containers are emitted explicitly as `{}` and `[]` so they do not collapse to a blank line. Numbers are written without quotes, and booleans as true/false. Unicode is preserved as-is rather than escaped.

Everything runs in your browser. The input text is never sent to a server, which matters when the JSON contains credentials, tokens, or customer records you would rather not put on the wire.

Use the JSON to YAML Converter

YAML
Paste json on the left to see the result.

Try an example:

Runs entirely in your browser — nothing you paste is uploaded or logged.

Worked examples

Real input and the exact output this page produces.

Example 1

JSON

                      {"name":"api","replicas":3,"env":{"LOG_LEVEL":"debug"}}
                    

YAML

                      name: api
replicas: 3
env:
  LOG_LEVEL: debug
                    

Example 2

JSON

                      {"tags":["a","b"],"active":true}
                    

YAML

                      tags:
  - a
  - b
active: true
                    

Frequently asked questions

Is my JSON uploaded to a server?

No. The conversion runs entirely in your browser using JavaScript, so the text never leaves your machine.

Will the conversion be lossless?

For plain objects, arrays, strings, numbers, and booleans, yes — converting back and forth returns equivalent data. YAML features that JSON cannot express, such as anchors and multiple documents, are outside the scope of this tool.

Why are some strings wrapped in quotes?

YAML parses unquoted yes, no, true, false, null, and on or off as booleans and null. A string containing one of those has to be quoted so it is not silently converted to a different type.

How are nested objects indented?

Using two spaces per level by default, which is the convention recommended by the YAML specification and what most tooling expects.

Others doing similar work.