Add Prefix and Suffix to Lines guide
Place consistent text before or after every line, with an optional sequence number that can skip blank rows.
What this tool does
Add Prefix & Suffix to Lines transforms newline-separated text. A prefix is inserted before each eligible line and a suffix is inserted after it. Writing {n} in either field inserts a sequence number beginning at the chosen starting value. When blank-line skipping is enabled, empty rows remain unchanged and do not consume a number.
The output is literal plain text. Prefixes and suffixes become part of every processed line; they are not temporary visual labels. The tool does not detect existing numbering, CSV quoting, Markdown syntax, programming-language strings, or duplicate affixes. Running the same transformation twice adds the text twice.
Typical uses include adding bullets, quote markers, command fragments, punctuation, labels, or numbered references to a prepared line list. For structured data and source code, confirm that inserted characters are valid for the destination format.
How to use it
- Paste one item or text record per line.
- Enter the prefix, suffix, or both.
- Include
{n}where a sequential number should appear. - Set the starting number and decide whether blank rows should be skipped.
- Select Apply to lines, then inspect and copy or download the result.
For example, a prefix of Item {n}: produces “Item 1: ”, “Item 2: ”, and so on. A suffix of ; adds a semicolon to every eligible row.
Benefits
- Applies identical text across many lines
- Supports sequence numbers in either field
- Allows positive, zero, or negative starting values
- Preserves blank rows when requested
- Reports the number of changed lines
- Processes and exports everything locally
Safe use with structured text
If lines contain CSV values, JSON, SQL, shell commands, or code, an innocent-looking quote, comma, or semicolon can change how another program interprets the result. Test a small sample and use the parser or editor designed for that format when correctness has operational or security consequences.