JSON to YAML Converter

Convert valid JSON into readable YAML locally in your browser.

This tool runs entirely in your browser. Your files are never uploaded to a server.

name: Ada
active: true
skills:
  - math
  - code

What this converter does

Parses strict JSON and serializes its value as readable YAML with two-space nesting and no generated aliases. Objects, arrays, strings, numbers, booleans and null are supported.

How to use it

Paste a valid JSON document into the editor. The YAML result updates immediately and can be copied; use Reset to clear both input and output.

Example

A JSON object containing a name and a skills array becomes YAML keys followed by an indented dash list. Nested objects retain their hierarchy.

JSON rules

The input must use double-quoted keys and strings. Comments, trailing commas, undefined, NaN, Infinity and JSON5 syntax are rejected with a parse error.

YAML output

Scalar quoting is selected by the serializer when needed to preserve the parsed value. The result represents the data model, not the original JSON spacing or key notation.

Limitations

Conversion cannot preserve duplicate JSON keys, comments or exact numeric spelling because JSON parsing normalizes them before YAML is produced.

Privacy

Parsing and serialization happen entirely in the browser. The JSON and generated YAML are never uploaded by this tool.

Frequently Asked Questions

Can this convert JSON arrays to YAML?
Yes. Top-level and nested JSON arrays become YAML sequences with one dash-prefixed entry per item.
Why does my JSON show an error?
The input must be strict JSON, so comments, trailing commas and single-quoted strings are not accepted.
Is the JSON sent to a server?
No. Both JSON parsing and YAML generation run locally inside your browser.