json-tools .ru

YAML to CSV

Parses a YAML list of objects (an inventory or user list from a config, for example) and builds a CSV table from it.

Structure requirements

CSV only comes out of a YAML list of objects (- key: value) or a single object. If the YAML's top level is just a scalar or a list of bare scalars with no keys, converting to CSV isn't possible — there's nothing to build headers from.

Nested keys and lists

A nested YAML object (address: {city: ...}) becomes a dot-separated column address.city, while a nested list inside a record stays a JSON string in the cell instead of becoming separate columns.

Format
YAML → CSV
Source text Paste text or upload a file
Result Type is not detected yet
Statistics appear after formatting