Skip to main content
WizTools123
WizTools123
Free Online Tools

Tool Categories


Text Tools New Tool

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.

Free Forever Nothing Uploaded Add or remove Never doubles up
Free Online Prefix and Suffix Adder For Lines Of Text
Share this tool
Advertisement Slot (Top Banner) Google AdSense Unit • Responsive Banner
Line Prefix and Suffix Everything happens in this tab. Nothing you paste is sent anywhere.
Your lines
0 characters 0 words 0 lines
Result
0 characters 0 lines
What to do
The text
Rules
The last line
Line number

Write {n} anywhere in the text above and it becomes the line number. {nn} and {nnn} pad it with zeros to two or three digits.

Removing

0 lines 0 changed 0 left alone 0 blank

Buy Us A Coffee

Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.

Buy Us A Coffee
Sponsored Content (Below Tool) Google AdSense Placement

How to Add A Prefix Or Suffix To Every Line

A few steps, and nothing is uploaded.

1
Paste your lines One item per line. A .txt file can be dropped onto the box instead of pasting.
2
Type what goes in front, behind, or both Either box can be left empty. A domain in front and a comma behind is the usual pair for building a list.
3
Decide about blanks and repeats 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.
4
Copy, or switch to remove The counters show how many lines changed. Switch the first menu to remove to take the same text off again.

What to Know About Prefixes and Suffixes

Blank lines, lines that already have it, and the line number token.

Running it twice does nothing by default, and that is deliberate. With "Skip a line that already has it" switched on, a line that already starts with your prefix is left alone. That makes the tool safe to run on a list that is half done, which is the usual state of a list somebody has been editing by hand.
Blank lines are skipped by default because a prefixed blank line is not blank. Adding a comma to an empty line creates a line containing a comma, and when that list goes into a system it becomes an empty record. Switch blanks on only when you really want every line treated the same.
The line number token does numbering and prefixing in one pass. Writing {n}. in the front box gives a numbered list, and writing it inside a longer prefix gives things like file-{nnn}-draft. The padded forms are for file names, where zeros keep a plain sort in the right order.
Removing matches exactly unless you say otherwise. A prefix of http:// will not come off a line that begins with HTTP:// until you switch on ignoring case. Case sensitivity is the default because web addresses, codes and identifiers are often case sensitive and a silent match would be wrong.
Trimming happens before adding, not after. If a line has stray spaces at the end and you add a comma, the comma lands after the spaces. Switching on trimming removes them first so the result is clean, which matters when the list is going into a database.

Key Features & Capabilities

What this tool does, and what it deliberately does not.

Front, behind or both One pass wraps every line the same way, with either box left empty if you only need one side.
No doubling up A line that already has the text is left alone, so running it again on a half finished list is safe.
Line numbers built in The {n} token becomes the line number, with padded forms for file names that have to sort properly.
Removes as well The same page strips a prefix or suffix again, with options for letter case and repeats.
The last line choice Leave the trailing comma off the final line, which is what most lists and most data formats want.
Nothing is uploaded Lists of addresses, file names and customer records stay in this tab.

About the Prefix and Suffix Tool

Putting the same text in front of every line is one of those jobs that sounds like it needs no tool at all, right up to the point where the list is four hundred lines long. The spreadsheet approach works, but it wants a helper column, a formula, a paste back, and it quietly leaves blank rows looking like real ones.

The useful behaviour here is the part that refuses to work. A line that already carries the prefix is left untouched, so you can run the tool over a list somebody has been halfway through editing and the half that is done stays done. Without that, the second pass gives you a double prefix on every line that was already correct, and spotting those by eye in four hundred lines is not realistic.

The line number token covers the common case where a prefix and numbering are the same job. Building file names, numbering a checklist, or generating identifiers all want a counter inside a fixed pattern, and doing it in two passes with two tools means the numbering is wrong the moment a line is inserted.

Frequently Asked Questions

Doubling up, numbering, case and removing again.

Put a comma in the behind box and set "The last line" to leave the behind text off it. That is the shape most lists and most data formats want, because a trailing comma on the final item is often an error.

Yes. Write {n} in the front box where you want the number, for example "{n}. " for a plain numbered list. Use {nn} or {nnn} to pad with zeros, and set the starting number if it should not begin at one.

Either they were blank, which is skipped by default, or they already began or ended with the text you are adding. The counters show how many were left alone so you can tell which it was.

Switch on "Ignore letter case when matching". The text is then matched regardless of capitals, which is useful for protocols and file extensions written inconsistently.

In remove mode, switch on removing it more than once. Without that, only one is taken off, which is safer when the text could legitimately appear again inside the line.

Other Text Tools

Advertisement Slot (Bottom Banner) Google AdSense Unit • Responsive Banner