Flatten a nested list

Paste an indented or nested list and get a flat one back - one item per line, no indentation. Optionally strip leading bullet markers (`- `, `* `, `• `) and numeric counters (`1. `, `2) `) per item. Nesting structure is not preserved; this tool is for collapsing, not walking a tree.

Input
Ready
Output
Live

A simple indentation + marker stripper

The tool walks line by line. Leading whitespace is stripped from every line first. Strip bullets (on by default) then removes leading `- `, `* `, or `• ` markers. Strip `1.` counters (off by default) removes leading numeric counters like `1. ` or `2) `. Each line is trimmed and blank lines are dropped.

Nesting hierarchy is lost by design. If your input has `Fruit > Apples`, the output is two adjacent lines - `Fruit` and `Apples` - with no indication that one was a child of the other. If you need to preserve structure, parse the list into a real tree before using this tool.

The two toggles are independent. Leave Strip bullets on and Strip counters off to clean a Markdown bullet list; turn both on for a list that mixes bullets and numbered sub-items; turn bullets off and counters on to strip just numbering from an ordered-list paste.

How to use flatten a nested list

  1. 1Paste your indented or nested list into the input panel
  2. 2Leave Strip bullets on to clean `-`, `*`, `•` markers (on by default)
  3. 3Toggle Strip "1." counters on to also remove numeric prefixes like `1. ` or `2) `
  4. 4Output is one item per line, no indentation
  5. 5Nesting is not preserved - use a real parser if you need the tree

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 tool actually does

Two toggles, one pass, no tree-walking.

Strips leading whitespace from every line

Indentation is removed unconditionally before marker stripping. This is what flattens a visually-nested list into a flat one.

Strip bullets toggle (default on)

Removes a leading `- `, `* `, or `• ` marker from each line (after indentation is stripped). Covers the common Markdown and plain-text bullet characters. Leave on unless you genuinely want the markers preserved.

Strip counters toggle (default off)

Removes leading numeric counters: `1. `, `2) `, `10. `, etc. Off by default because users often want to preserve numbering from an ordered list. Turn on when the counters are noise.

Blank lines dropped

Lines that become empty after trimming and marker stripping are filtered out. Blank input lines do not produce empty output lines.

Nesting is lost, not preserved

This is a flattener, not a tree walker. A sub-item ` - Apple` becomes `Apple` with no indication of its parent. For structure-preserving walks, parse the list into a real tree first.

Worked example

Default settings: bullets stripped, counters untouched, indentation dropped.

Input
- Fruit
  - Apples
  - Oranges
  - Cherries
- Veg
  - Carrots
  - Potatoes
Output
Fruit
Apples
Oranges
Cherries
Veg
Carrots
Potatoes

Settings reference

How each option shapes the output using the sample above.

Setting What it does Effect on the sample
Leading whitespace (automatic) Always removed - this is how flattening happens Two-space indents disappear; every item is left-aligned
Strip bullets: on (default) Removes `- `, `* `, `• ` markers from the start of each line `- Fruit` becomes `Fruit`; same for every sub-item
Strip bullets: off Keeps markers in the output Items retain `- ` prefixes (`- Fruit`, `- Apples`)
Strip "1." counters: off (default) Numeric counters (`1. `, `2) `) pass through Not applicable to this sample (no counters)
Strip "1." counters: on Removes leading `N. ` or `N) ` from each line If input had `1. Foo`, output would be `Foo`

FAQ

Does the tool preserve the nesting hierarchy?
No. This is a flattener - sub-items come out at the same level as their parents, with no indication of the original structure. If you need to walk the tree and keep the hierarchy, parse the list with a structure-aware tool first.
What marker characters does Strip bullets handle?
`-`, `*`, and `•` - the common Markdown and plain-text bullets. Numeric counters (`1. `, `2) `) are controlled by the separate Strip counters toggle. Other marker glyphs (`→`, `▪`, `◦`) are not recognised.
Why are the two toggles split?
Because users often want different combinations. The default (bullets on, counters off) cleans a typical Markdown bulleted list while preserving any numbered sub-items. Turn both on for a fully generic strip; turn bullets off and counters on to target only numbering.
What happens to lines that are only a bullet with no text?
The marker is stripped, whitespace is trimmed, and the result is an empty string which is filtered out. A `- ` line with no text does not appear in the output.
What is the opposite of this operation?
Adding bullets back is Add bullets; adding counters is Add counters. Nesting cannot be restored mechanically - once flattened, the tree is gone.