Back to public tools
All tools
Text utility

Text Prefix & Suffix

Add text to the start or end of every line. Turn a plain list into bullet points, or finish each line with the same punctuation.

Your text stays in your browser and is never uploaded or stored.

Paste one item per line, then enter a prefix, suffix or both. The complete result updates locally. Advanced settings adds numbering, line selection, imports and reusable settings.

Active mode: add wrappers. All original lines; no matching filter; prefix/suffix text is literal. Empty lines may be skipped; whitespace-only lines are still processed. Output uses LF line endings. Wrapping presets do not escape code or markup.

Updating the current transformation…

Advanced settings

With numbering enabled in Add mode, {n} is the selected-line sequence and {line} the original line number. {{n}} emits literal {n}. Unknown brace text stays literal. Removal treats both fields literally and removes each at most once. Duplicate prevention affects prefixes only; suffixes can repeat.

Source files: UTF-8 up to 2 MiB. Settings JSON: up to 64 KiB, exact versioned schema. Reads stop after five seconds. Invalid imports leave current text and settings unchanged. Settings contain options only; custom suffix-list content is kept in memory separately.

Processing stays local. Limits: 2 MiB source and suffix list, 100,000 original lines, 8 MiB transformed text, 32 MiB complete report and eight seconds of worker processing. Oversized work is refused in full. Source text is never overwritten automatically.

How to add or remove text around lines

Paste one item per line and fill Prefix, Suffix or both. The complete result updates locally; Copy result and Download .txt keep all transformed lines. Leave blank lines unchanged skips empty lines, including a trailing empty line; whitespace-only lines still receive wrappers. Clear, example and imports offer Undo while keeping transformation settings.

Advanced settings adds original line ranges, literal matching, numbering, wrapping presets and duplicate-prefix prevention. The separate Remove mode strips one exact prefix, then one exact suffix from the remaining selected line. It leaves your source field unchanged. Closing Advanced preserves all settings.

Example: number selected items and align suffixes

Enter Bread, Milk and Tea on separate lines. Enable sequential placeholders, set Prefix to “{n}. ”, Start1 and Step1. The result is1. Bread,2. Milk,3. Tea. Use a range such as2-3 to number only Milk and Tea. {line} always means the original source line number; {{n}} emits a literal placeholder. Unknown brace text remains literal.

Enable custom suffixes to align a second list with every original physical source line, including skipped, blank and trailing lines. Each custom suffix is appended after the shared suffix. A length mismatch blocks the whole result. Quote/bracket presets add literal characters and do not escape JavaScript, JSON, SQL or markup.

About selection, whitespace and reusable settings

Ranges are1-based, inclusive and checked against the current source. Matching uses original line text with optional case-insensitive comparison; it never executes regular expressions. Numbering advances across selected non-skipped lines. Duplicate prevention checks only the actual expanded prefix; suffixes can repeat. Removal uses literal fields and ignores numbering/custom suffix content.

UTF-8 imports preserve your current text on error, remove one leading BOM and stop after five seconds. Settings JSON uses a strict versioned format and contains only transformation options, not source or suffix-list text. Imported settings can be undone separately. The optional whitespace inspector marks spaces, tabs and line endings; it is a bounded display aid, while copy/download retain real characters.

Output normalizes CRLF/CR to LF as the original tool did. Original source and complete per-line provenance remain in the JSON report. Work stays in this browser:2 MiB source/suffix-list input, 100,000 lines, 8 MiB complete output, 32 MiB report and an eight-second worker deadline. Oversized work is refused in full. Existing localized tools and the other text utilities retain their behavior.

Stars and feedback

Loading…

Tool reference #126