Hype StackHypeStack

JSON to YAML converter.

Paste JSON and get YAML you can drop into a Compose file, a Helm values file or a workflow. Long strings stay on one line.

  • Free
  • No signup
  • Runs in your browser
Indent

Strings like "no" and "on" are quoted, so PyYAML and other YAML 1.1 readers keep them as text.

How it works.

  1. 1

    Paste JSON or open a .json file. Invalid JSON shows the line and column of the error.

  2. 2

    Choose 2 or 4 space indentation, key sorting, and whether to quote values older parsers misread.

  3. 3

    Copy the YAML or download it as a .yaml file.

Quoting that keeps your values intact

Your JSON says "no", a string. Written as plain YAML, no is still a string to a YAML 1.2 parser, but PyYAML and other YAML 1.1 readers turn it into false. The same goes for on, off, yes and dates.

With quoting on, those values are written in quotes, so every parser reads the data you started with. Turn it off if you only target YAML 1.2 and want the shortest output.

When YAML beats JSON, and when it doesn't

YAML is nicer for files people edit: no braces, no quotes on most strings, and comments. That's why Compose, Kubernetes and GitHub Actions use it. JSON is better for data that machines exchange, because there's only one way to read it.

The conversion loses nothing. Every JSON value has a YAML form, and running the result through YAML to JSON gives the same data back.

Questions, answered.

How do I convert JSON to YAML?

Paste your JSON into the box above. The YAML appears on the right as you type. Pick the indent, then copy it or download the .yaml file.

Does the output work for Docker Compose and Kubernetes?

Yes. It's standard YAML with block style maps and lists, which both read. Keep the 2 space indent, which is what their docs use.

Why are some strings in quotes?

Strings that look like another type are quoted so they stay strings: "123", "true", an empty string, and with the quoting option on, "no", "on" and dates. Unquoted, a parser would read them as a number, a boolean or a date.

Can I add comments to the YAML?

JSON has no comments, so there are none to carry over. Once converted, add # comments anywhere in the YAML by hand.

More free tools.

All tools

Skip the setup files.

Add a staging environment next to production.. Run a nightly job that cleans up expired invites.. Add Stripe billing with a free trial.

Hype Stack is a free starter with six apps already wired to one API. Auth, billing and emails install as packs, and your coding agent builds the rest.