JSON to YAML Converter

Convert JSON to clean, readable YAML with 2 or 4 space indentation. Strings that YAML would misread (yes, no, 1.0, dates) are quoted automatically so the data round-trips.

How it works

JSON is a subset of YAML 1.2 in practice, so every JSON value has a YAML form. The converter picks block style for readability.

Strings that look like booleans, numbers, null or dates are quoted, so parsing the YAML back gives exactly the original JSON.

Everything above runs in JavaScript inside this tab. Your data is not uploaded. Inputs are remembered in this browser only so they survive a reload; you can switch that off on the privacy page.

Questions

Why are some strings quoted?

Without quotes, a YAML parser would read values like "yes", "1.0" or "2024-01-01" as a boolean, number or date. Quoting keeps them strings.

Can I get flow style ({ a: 1 })?

Block style is used because it is what humans edit in config files. Valid JSON is also valid YAML if you need flow style.

Is my JSON sent to a server?

No. Conversion happens in your browser. The only network request is the optional AI explanation when your input has an error and you ask for it.