Skip to content
My Tiny Utils

Search tools

Type to find a tool, then press Enter to open it.

JSON to YAML

Convert JSON to clean, readable YAML instantly. Preserves nesting, quotes strings only when needed, and handles edge cases safely.

Processed locally in your browser — nothing is uploaded.

JSON to YAML

0 characters

YAML

Output appears here…

About JSON to YAML

Convert JSON documents to YAML — useful for Kubernetes manifests, CI configs, and any tool that prefers YAML. Strings are quoted only when YAML would otherwise misinterpret them (like 'yes', '1.0', or strings with colons), keeping output clean.

Common uses

  • Turn a JSON config into a YAML one (docker-compose, GitHub Actions, k8s)
  • Make deeply nested JSON easier for humans to read

Example

Input

{"server": {"port": 8080, "hosts": ["a", "b"]}}

Output

server:
  port: 8080
  hosts:
    - a
    - b

Frequently asked questions

Why are some strings quoted in the YAML output?

Because unquoted, YAML would parse them as something else — 1.0 becomes a number, values like yes or true become booleans in many parsers, and a colon followed by a space starts a mapping. Strings are quoted only when needed, so the rest of the output stays clean.

Does converting JSON to YAML lose any data?

No. YAML's data model covers everything JSON can express — objects, arrays, strings, numbers, booleans, and null — so the conversion is lossless. Nesting is preserved with 2-space indentation and long strings are never wrapped.

Is my config uploaded during the conversion?

No. The JSON is parsed and the YAML generated locally in your browser, which matters when the config holds connection strings, tokens, or other credentials.

Is JSON already valid YAML?

Technically yes — YAML 1.2 is a superset of JSON, so most YAML parsers accept raw JSON. Converting is still worth it because block-style YAML is far easier to read, edit, and diff than braces and brackets.