Developer

JSON to YAML Converter

Paste JSON and get clean, indented YAML back, with objects, arrays, and every scalar type handled and clear errors for invalid input — all in your browser.

YAML
name: calctoo
version: 5
public: true
tags:
  - dev
  - tools
meta:
  author: team
  stars: null

How it works

Paste any valid JSON and the tool parses it, then walks the resulting structure and prints the YAML equivalent. Objects become key-value pairs, arrays become dash-prefixed lists, and nesting is expressed with two-space indentation the way most YAML in the wild is written.

Scalars are mapped carefully. Numbers, true, false, and null print bare. Strings print bare too, unless they'd be misread as something else — a string like "true", "12", or one holding a colon or leading space gets wrapped in quotes so it survives a round trip back to the same value.

If what you paste isn't valid JSON, you'll get a plain-language error pointing at the problem instead of a broken result. The whole thing runs client-side, so large or sensitive payloads never leave your machine.

Frequently asked questions

Why did some of my strings come back in quotes?

Because bare they'd change meaning. A value like "yes", "null", or "3.14" would parse as a boolean, null, or number in YAML, so the tool quotes it to preserve the original string. Strings with colons or leading spaces get quoted for the same reason.

Does it keep my key order?

Yes. Keys come out in the same order JavaScript reports them, which for normal object keys is insertion order. Purely numeric keys are an edge case JavaScript reorders, but those are rare in configs.

What happens with invalid JSON?

You'll see a short message explaining that the input isn't valid JSON, along with the parser's own note about where it choked. Nothing crashes and the last good output simply isn't updated.