Free Online Prefix and Suffix Adder For Lines Of Text
Put the same text in front of every line, behind every line, or both, entirely in your browser. Blank lines are left alone, text that is already there is not added twice, and a line number can be inserted where you want it. The same page removes a prefix or suffix that is already on the lines.
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
How to Use Line Prefix and Suffix
Step by step, start to finish.
One item per line. A .txt file can be dropped onto the box instead of pasting.
Either box can be left empty. A domain in front and a comma behind is the usual pair for building a list.
Blank lines are skipped by default, and a line that already has the text is left as it is, so running the tool twice changes nothing.
The counters show how many lines changed. Switch the first menu to remove to take the same text off again.
Key Features
What this tool does, and what it does not do.
One pass wraps every line the same way, with either box left empty if you only need one side.
A line that already has the text is left alone, so running it again on a half finished list is safe.
The {n} token becomes the line number, with padded forms for file names that have to sort properly.
The same page strips a prefix or suffix again, with options for letter case and repeats.
Leave the trailing comma off the final line, which is what most lists and most data formats want.
Lists of addresses, file names and customer records stay in this tab.
About Line Prefix and Suffix
Putting the same text in front of every line sounds too simple to need a tool, until the list is four hundred lines long. A spreadsheet can do it with a helper column and a formula, but then you paste it back, and blank rows end up looking like real entries. This page wraps every line in one pass: type what goes in front, what goes behind, or both, and copy the result.
Typical jobs
- Turn a list of paths into full addresses by putting
https://example.com/in front. - Wrap each value in quotes and add a comma behind, ready to paste into code or a SQL
IN (...)list. - Add
-or*to make a Markdown bullet list. - Add a file extension such as
.jpgto a list of names.
Safe to run twice
Skip a line that already has it is on by default. A line that already starts with your prefix, or already ends with your suffix, keeps exactly what it has, so you can run the tool over a list someone was halfway through editing and the finished half stays correct. The left alone counter shows how many lines were skipped this way, so a second pass is easy to check even on hundreds of lines.
Line numbers inside the pattern
Write {n} anywhere in either box and it becomes the line number. {nn} and {nnn} pad it with zeros to two or three digits, and you can choose the starting number. A front box of photo-{nnn}- gives photo-001-, photo-002- and so on, which is how file names and identifiers usually need to look, with the counter and the fixed text built in one pass.
The details that matter in data
The last line setting can leave the behind text off the final line, which is what you want for a comma separated list where a trailing comma would be an error. Blank lines are skipped unless you include them, and Trim each line before adding removes stray spaces first so the prefix sits right against the text.
Switch the first menu to remove it to take a prefix or suffix off again, with options to ignore letter case and to remove repeats. All of it runs in your browser tab, so address lists and customer records stay on your computer.
Frequently Asked Questions
Common questions about this tool.
More Text Tools
Other tools from the same hub, free and in your browser.
Feedback
No feedback on this tool yet. Yours would be the first.