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
- 1Paste your list into the input panel
- 2Type the opening string in Before (default `<`)
- 3Type the closing string in After (default `>`)
- 4Output prepends Before + appends After to every line - blanks included
- 5Reverse with Unwrap using the same Before/After
Keyboard shortcuts
Drive ListShift without touching the mouse.
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.
Apple Banana Cherry
"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 `<>` |