Wrap text around list items

Paste a list and wrap every line with a Before string and an After string. Default is `<` / `>` for HTML-tag style. Use `<li>` / `</li>` for markup, `(` / `)` for grouping, `"` / `",` for CSV rows.

Input
Ready
Output
Live

Two fields, applied verbatim to every line

Before and After are two independent text fields. Whatever you type in Before is prepended to every line; whatever is in After is appended. Both are emitted as-is - no trimming, no escaping, no skipping.

That makes this a one-shot alternative to running Add a prefix and Add a suffix back-to-back. When only one side is needed, those dedicated tools are clearer; when both sides are part of the same envelope (HTML tag pair, CSV quoting + comma), Wrap is the fit.

To reverse, use Unwrap - it strips the Before and After strings you specify from each line, if they match.

How to use wrap text around list items

  1. 1Paste your list into the input panel
  2. 2Type the opening string in Before (default `<`)
  3. 3Type the closing string in After (default `>`)
  4. 4Output prepends Before + appends After to every line - blanks included
  5. 5Reverse with Unwrap using the same Before/After

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

Before + line + After, every line.

HTML tag pairs

Set Before to `<li>` and After to `</li>` to wrap each line as a list item. Same pattern for `<p>…</p>`, `<td>…</td>`, `<option>…</option>`.

CSV row fragments

Before `"` and After `",` gives `"Apple",` per line. Chain Join with empty separator for a single row, or strip the trailing comma from the last line manually.

Bracket or grouping wrappers

`(` / `)`, `[` / `]`, `{` / `}` - useful for SQL tuple rows, Markdown link targets, or JSON-like fragments.

Every line, including blanks

An empty line becomes `Before + After` (e.g. `<>` with defaults). Chain Remove empty lines first if that matters.

No escaping

Line content is emitted verbatim. If lines contain characters that need escaping for the target format (e.g. `<` / `&` for HTML, `"` for CSV), pre-process with Replace.

Worked example

Before `"` and After `",` - ready for CSV single-row concatenation.

Input
Apple
Banana
Cherry
Output
"Apple",
"Banana",
"Cherry",

Settings reference

How Before and After shape the output using the sample above.

Setting What it does Effect on the sample
Before: `<li>`, After: `</li>` HTML list-item pairs `<li>Apple</li>` / etc.
Before: `"`, After: `",` CSV row fragments `"Apple",` / `"Banana",` / `"Cherry",`
Before: `(`, After: `)` Bracketed groupings `(Apple)` / `(Banana)` / `(Cherry)`
Before empty, After `.` Equivalent to Add a suffix `Apple.` / `Banana.` / `Cherry.`
Blank-line behaviour (automatic) Blank lines become Before + After with nothing between With defaults: blank becomes `<>`

FAQ

Does the tool skip blank lines?
No. Every line gets Before + After applied. Run Remove empty lines first to drop blanks.
Can I use multi-character strings like `<li>`?
Yes. Both Before and After accept any string, including tags, brackets, quote+comma combinations, or empty.
Is HTML content escaped?
No. Content is wrapped verbatim - if your input contains `<`, `>`, or `&`, the output will contain them too. Pre-process with Replace for HTML-safe output.
How is this different from Add a prefix + Add a suffix?
The result is identical to running Add a prefix then Add a suffix. Wrap is the one-shot version when both sides belong to the same envelope.
How do I remove the wrappers later?
Use Unwrap with the same Before and After strings - it strips them if they match each line's start and end.