Free Online JSON to YAML Converter

Paste JSON below to get clean, properly indented YAML.

Input Ready

Input statistics are available via the Stats button above this field.

Output

Output statistics are available via the Stats button above this field.

Results are provided for informational purposes only and may contain errors. Please verify important information independently. Use of this tool is at your own risk.

What the JSON to YAML Converter does

The JSON to YAML Converter rewrites JSON as YAML: indentation replaces braces, list items start with a dash, and most strings no longer need quotes. The data is the same; only the notation changes.

Strings that could be misread in YAML, such as yes, null or text containing a colon, are quoted automatically so they stay strings.

Key order is kept, nested objects become indented blocks, and arrays of objects become lists whose items start with a dash. Empty arrays and objects are written as [] and {}.

When to use it

  • Writing Kubernetes manifests, Docker Compose files, GitHub Actions workflows or Ansible playbooks from JSON you already have.
  • Making a long configuration easier to read and review.
  • Converting an OpenAPI specification from JSON to the more common YAML form.
  • Preparing values for a Helm chart or another YAML-based configuration from a JSON export.

Worked example

Input

{"server": {"host": "localhost", "port": 8080}, "features": ["auth", "logging"], "debug": false}

Output

server:
  host: localhost
  port: 8080
features:
  - auth
  - logging
debug: false

Common questions about the JSON to YAML Converter

Is every JSON document valid YAML?

Yes. YAML 1.2 is a superset of JSON. Converting to block-style YAML makes it easier to read, but the data stays the same.

Can I add comments?

Yes, after converting. YAML supports comments that start with #. JSON has no comments, so the converter has none to carry over.

How do I go back to JSON?

Use the YAML to JSON Converter. Comments you added in YAML are dropped, because JSON cannot store them.

Frequently Asked Questions

Will comments be preserved?

No - JSON has no concept of comments, so there’s nothing to carry over. You’ll get clean YAML data structure only.

Can I convert YAML back to JSON?

Yes, see the YAML to JSON converter, or use the swap (⇄) button above to flip source and target instantly.

Is this tool free?

Yes, it's free to use. No signup, no email required. Get results on this page.

How do I get my result?

Use the tool on this page. Your result appears here; no email delivery is required.