To add a prefix to every line, paste the list into Line Prefix and Suffix, enter the prefix and check the preview. The tool adds literal text at the start or end of each line. It does not interpret your affix as a command or a template.
Put a small sample through first
Suppose a list contains alpha and beta. A prefix of item: produces item: alpha and item: beta. A suffix of ; adds a semicolon to the end of both lines. Spaces inside the affixes are part of the result, so include a trailing prefix space only when you want that separation.
Three settings determine the result:
- Enter the literal prefix, suffix or both.
- Decide whether empty lines receive the affixes.
- Choose whether the result preserves, always adds or never includes a final newline.
Check those settings on a sample containing a normal line, an empty line and the last item. That catches most formatting surprises before you process the full list.
Empty lines remain part of the list
"Leave empty lines unchanged" means the blank lines stay blank. It does not remove them. This is useful when a list uses blank separators between groups and each populated line needs a label.
With that setting off, an empty line receives the selected prefix and suffix too. A prefix of item: will therefore create a line containing only that prefix. Decide whether such a line belongs in the receiving file.
A line containing spaces is different from a truly empty line. Inspect whitespace-only lines if the result contains unexpected affixes. Do not remove all blank separators simply to make the preview look shorter.
If the list also needs deduplication or alphabetical ordering, Remove Duplicate Lines and Sort Lines perform those separate operations. Do that first when the original line content should determine equality or order; add labels afterward.
Check the final newline and literal characters
The preserve policy follows whether the input ended with a newline. Always and Never make that choice explicit. A final newline is a file-format detail, not an extra list item, but a destination may display it as an empty cursor line.
Line endings are normalized to LF. If a receiving application specifically needs another line-ending convention, handle that requirement in the destination editor rather than assuming this tool preserves it.
Affixes cannot contain line breaks and are limited to five hundred characters each. Input is capped at two hundred thousand characters and the expanded output at one million. Repeating a long prefix over many short lines can reach the output limit before the input limit.
For code-like lists, inspect quotation marks, commas and escaping requirements before using the output. Adding quotation marks around lines does not escape quotation marks already present inside each value.