JSON → YAML

JSON to YAML

JSON to YAML replaces JSON braces and quoted keys with YAML mappings and sequences while keeping the parsed data values. Choose indentation or emit array items as separate YAML documents.

Drop a file or paste below
Conversion options

Ready

JSON values in YAML

Objects become mappings and arrays become sequences. Numbers, booleans and null stay typed values. A JSON string such as "01" or "true" needs a string representation in YAML, not an unquoted value that could change meaning. The serializer chooses quoting where it is needed to preserve the JSON value.

Single YAML document and document streams

Normal output is one YAML document, even when the JSON root is an array. Separate-document output requires a root array and writes each item after a --- marker. Use a single array when the receiver expects a list; use document streams when the receiver accepts independent YAML documents.

Indentation and valid JSON input

Choose two or four spaces for nested blocks. JSON input must use double-quoted keys and cannot include comments or trailing commas. Changing indentation affects presentation without changing the parsed values. JSON has no comment syntax, so this direction cannot create original source comments or YAML anchors.

Format references

YAML 1.2.2 · JSON format

File content is read and converted in the browser. Conversion does not upload the source to a server.

Frequently asked questions

Can an array become several YAML documents?

Yes. Enable separate documents to emit each root-array item after ---.

Are quoted numbers kept as strings?

Yes. A JSON string stays a YAML string.