per-line · prefix + suffix · live

Add a prefix or suffix to every line

Wrap each line with whatever you need — quote marks, bullets, terminators. Optionally skip blank lines.

Add Prefix / Suffix Workspace
Lines
3
28 B
Output size
34 B
wrapped
Prefix
>
2 chars
Suffix
—
skip blank
PrefixSuffix
input · lines
output · wrapped
> item one
> item two
> item three
Quick Start

How to add a prefix or suffix to lines

Wrap each line with arbitrary text. Useful for quoting, bulleting, or terminating statements.

  1. 01

    Paste lines

    Drop a newline-delimited list into the input panel — TODO items, SQL statements, email addresses, names, URLs, anything that needs per-line wrapping. The tool splits on \n and operates on each line independently.

    Lines preserve their original ordering; only the leading and trailing tokens are added. Paste with ⌘V / Ctrl+V — no upload, runs in-browser.

    one per lineTODO listSQL batchnewline split
    input · lines2 lines
    apple
    banana
    11 B · 2 linesraw
  2. 02

    Set prefix/suffix

    Type your prefix and suffix tokens. Common patterns include > for Markdown blockquotes, - or * for bullets, ; for SQL statement terminators, and " / ", for JS/JSON string-array entries.

    Both fields accept literal whitespace — type a space after the prefix to get > text rather than >text. The transform re-runs live on every keystroke via React state.

    Markdown quotebulletsSQL terminatorJSON arraylive
    prefix · suffix> · (none)
    > apple
    > banana
    15 B · wrappedMD blockquote
  3. 03

    Skip blanks

    By default the Skip blank lines checkbox preserves empty rows untouched — useful for keeping paragraph separation when prefixing a blockquote. Disable it to wrap every line including pure-whitespace ones.

    A line counts as blank when line.trim() === "", so lines with only tabs or spaces are treated as empty too.

    blank skipwhitespace-onlyparagraph breakpreserve gaps
    blanks · skippedtrim() check
    > a
    
    > b
    gap preserveddefault ON
  4. 04

    Copy or download

    Hit Copy output to push the wrapped result to your clipboard via the async navigator.clipboard API, or use the download menu to save as .txt.

    Everything stays local — open DevTools → Network and you will see zero outbound requests during the transform.

    clipboard.txt download100% client-sideno upload
    export · 2 actionsready
    ✓ Copied
    shipped · localsuccess
Pro tips

Text-processing fundamentals worth knowing

Tokenise with Unicode classes

Use \p{L}\p{N} with the u flag so accents, ideographs, and emoji count properly.

Normalise line endings

Convert \r\n to \n before diffing or hashing — Windows-vs-Unix endings produce phantom changes.

Mind invisible characters

Zero-width joiners, BOMs, and non-breaking spaces look identical to ASCII space. Strip them before comparison or storage.

Stream don’t slurp

For multi-megabyte text, iterate line-by-line rather than loading everything to memory — keeps the tab responsive.

Choose collation deliberately

Default JS sort is code-point order, not human alphabetical. Use Intl.Collator for locale-aware sorting.

Re-run after normalisation

NFC vs NFD changes byte length but not visible glyphs. String.prototype.normalize() before counts and comparisons.

Use Cases

When to wrap lines

Anywhere you need consistent line wrapping.

Markdown quotes

Prefix every line with > for blockquote. Tokenisation uses Unicode property classes (\p{L}, \p{N}) with the u flag so accents, ideographs, and emoji code points all count correctly. Surrogate-pair-aware counts mean 🚀 weighs 1, not 2.

Unicode-correct

Bullet lists

Add - or * to convert prose to bullets. Result updates as you type — paste and watch totals settle in milliseconds even on multi-megabyte inputs. Heavy work runs through a memoised reducer so the editor never janks.

diff-clean

SQL statements

Suffix ; to a list of statements. Output normalises line endings to LF for clean diffs across platforms. Windows-vs-Unix CRLF mismatches disappear, which keeps git blame honest and review comments focused on real changes.

instant counts

String arrays

Wrap each item with " and end with , for JSON/JS arrays.

platform-aware

Comment blocks

Prefix // or # for batch commenting. All processing runs client-side — paste sensitive or pre-publish copy without it leaving the tab. The clipboard API writes UTF-8 text/plain so it survives transit to any editor or CMS.

code-point-accurate

Email lists

Prefix mailto: for clickable lists. Same input plus same options always produces identical output, so the tool is safe to embed in CI scripts or doc-generation pipelines without race conditions.

lossless
FAQ

Frequently asked questions

Yes — prefix-only or suffix-only is fine.
When 'Skip blank' is on, any line that contains only whitespace.
Yes — never adds or removes lines, just wraps.
Type them literally — newlines will inject blank lines around each wrap.
No. All processing runs locally.
Suggest a tool

Something missing?

Tell us what you need. We ship the top requests every two weeks.

Sent straight to the maintainers · no account needed
47 in queue·8 shipped this month
Request queued. Thanks!