Convert JSON to YAML

JSON is parsed and written as YAML. Objects, arrays and values are converted; comments and original formatting are not preserved. Validate the result with your consumer.

Drop a file here or click to choose one — JSON

Processed entirely in your browser using a Web Worker. Nothing is uploaded.

When to convert JSON to YAML

Good for moving generated settings into a hand-maintained config, such as a Kubernetes manifest or CI pipeline. YAML drops most brackets and quotes, so reviews and diffs are easier to read, and unlike JSON it lets you add comments once converted. Indentation now carries meaning, so run the file through your tool's validator before you commit it.

How it works

  1. Drop your JSON file into the box above, or click to choose one.
  2. Your browser parses it and rewrites it as YAML instantly — nothing is sent anywhere.
  3. Download the YAML file. That's it.

Questions

Does anything get lost converting to YAML?

JSON is parsed and written as YAML. Objects, arrays and values are converted; comments and original formatting are not preserved. Validate the result with your consumer.

Are strings and numbers kept apart?

Yes. In our test "123" came out as '123' in quotes and 123 stayed a bare number, while true and null kept their types. The quotes are what stop a YAML reader changing the type.

My JSON has comments. Why did it fail?

Standard JSON does not allow comments or trailing commas, so the file stops with a parse error that names the line and column. Remove them first, then convert again.

Why is the key n written as 'n'?

Some YAML readers treat a bare n or y as a boolean, so the writer quotes those keys to keep them as text. It looks unusual but is valid and reads back as the same key.

Having trouble with this tool? Report an issue →