Convert YAML to a list

Paste YAML and get a flat list back. Every sequence entry (`- item`) becomes one output line. Optionally include mapping keys (`key: value`) for a richer dump. Choose the output format - plain, bulleted, numbered, or indented - to drop the result directly into the next tool.

Input
Ready
Output
Live

A simple YAML sequence extractor

The parser walks the YAML line by line with a regex rather than a full YAML library - it is fast, forgiving, and handles the cases most lists actually look like. Lines matching `- item` are captured (with surrounding single/double quotes stripped). When Include mapping keys is on, lines matching `key: value` are also captured and emitted either as `key: value` or just `key` when the value is empty.

It does not attempt to resolve anchors, merge tags (`<<`), block scalars (`|`, `>`), or deeply nested structures. A flat sequence works. A top-level sequence under a mapping (`items:\n - x`) works because the `- x` lines still match. Anchors, complex types, and multi-line scalars are skipped or handled imperfectly.

Output format wraps each extracted item: plain (default) emits as-is, bullets prepends `• `, numbered prepends `N. `, indented prepends four spaces. Trim (on by default) strips leading and trailing whitespace per item after extraction. The combination covers every everyday "YAML list → something I can paste" need without dragging in a full parser.

How to use convert yaml to a list

  1. 1Paste your YAML into the input panel
  2. 2Toggle Include mapping keys if your YAML contains `key: value` lines you want captured
  3. 3Pick Format: Plain (default), Bulleted, Numbered, or Indented
  4. 4Leave Trim on unless you want raw indentation preserved on extracted items
  5. 5Copy the list or feed it forward - pair with convert-a-list-to-yaml to round-trip

Keyboard shortcuts

Drive ListShift without touching the mouse.

Shortcut Action
Ctrl ZUndo last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor
EscExit fullscreen
Ctrl KOpen the command palette to jump to any tool
Ctrl SSave current pipeline draft Plus
Ctrl PRun a saved pipeline Plus

What this extractor actually does

Regex-based parsing, sequence-first, four formatting modes.

Regex-based, not a full YAML library

Lines matching `- value` are captured; lines not matching are ignored. Fast and predictable for everyday list-shaped YAML; limited for anchors, merge tags, and block scalars.

Automatic quote stripping on sequence entries

A captured item like `- "my value"` or `- 'my value'` has the surrounding quotes removed. Inner quotes are preserved. Matches YAML's own quoting semantics closely enough for most data.

Optional mapping-key capture

With Include mapping keys on, lines matching `key: value` (at any indent) are also captured. Empty-value keys emit just `key`; filled ones emit `key: value`. Off by default because most users only want sequence entries.

Four output formats

Plain (default) emits each item verbatim. Bulleted prepends `• `. Numbered prepends `1. `, `2. `, … per line. Indented prepends four spaces. Use Bulleted / Numbered / Indented when the next tool or target format expects the marker.

Trim post-processing

After extraction, Trim (on by default) strips leading and trailing whitespace from each captured item. Applies equally to sequence entries and mapping-key lines. If you want the raw indentation preserved, turn it off.

Worked example

Three `- item` lines extracted into a plain list.

Input
items:
  - apple
  - banana
  - cherry
Output
apple
banana
cherry

Settings reference

How each option shapes the extracted list using the sample above.

Setting What it does Effect on the sample
Format: Plain (default) Each item on its own line, no prefix `apple` / `banana` / `cherry`
Format: Bulleted Prepends `• ` to each item `• apple` / `• banana` / `• cherry`
Format: Numbered Prepends `1. `, `2. `, … per line `1. apple` / `2. banana` / `3. cherry`
Format: Indented Prepends four spaces ` apple` / ` banana` / ` cherry`
Include mapping keys: on Also captures `key: value` lines; empty-value keys emit just the key name (no colon), filled keys emit `key: value` Adds `items` (no colon, because the `items:` key in the sample has no value on the same line) at the top
Trim (default on) Strips whitespace per item No visible change on the sample

FAQ

Does this handle nested or multi-level YAML?
Shallowly - it captures `- item` lines at any indent, so a top-level mapping with a sequence underneath (`items:\n - x`) works. Deeply nested structures with anchors, merge tags, or block scalars are not fully supported - the regex picks up what it can and skips the rest.
What does Include mapping keys actually emit?
Lines matching `key: value` are captured. Empty-value keys (`items:`) emit just `items`; filled keys (`name: Alice`) emit `name: Alice`. Sequence entries are unaffected by this toggle - they are always captured.
Are single or double quotes around sequence entries stripped?
Yes. `- "my value"` and `- 'my value'` are captured as `my value`. Inner quotes survive (`- "He said \"hi\""` becomes `He said "hi"`).
What happens if my YAML has an anchor or a reference?
Anchors (`&id`) and references (`*id`) are not resolved. The anchor line is captured as part of its value; the reference emits the literal `*id` text. If you need anchor resolution, round-trip through a real YAML-aware tool first.
Can I build YAML from a list?
Yes, use convert-a-list-to-yaml - it wraps each line in `- ` and quotes values containing YAML-reserved characters. Flat-list round-tripping works; complex YAML does not.