JSON to YAML

Convert JSON and YAML in either direction.

Loading tool

This tool runs in your browser. Nothing is uploaded.

Paste one format and copy the other. Indent and quote style follow common YAML 1.2 habits.

How to use this tool

  1. Paste the snippet. Drop JSON, code, or a token into the input. It is not sent to a server.
  2. Run the action. Format, decode, or generate. Parse errors stay on the page.
  3. Copy the output. Copy the result back into your editor or terminal.

Types

Unquoted yes, no, and on can become booleans in YAML 1.1. This converter treats them as strings when they came from JSON strings.

Frequently asked

Are anchors and aliases preserved?

JSON has no anchors. YAML aliases expand when converting to JSON.

Can I keep comments?

Comments are dropped. JSON cannot hold them.

What about multi-document YAML?

Only the first document is converted.

Does it upload the file?

No.

Why did 08 become a string?

Leading-zero numbers are quoted so they do not become octal surprises.