Add Prefix and Suffix to Lines

Add the same text to the start or end of every line in one go. Great for lists, code, spreadsheets and social posts.

Tip: type {n} in either box to insert the line number.

How to add text to every line

  1. Paste your list into the top box, one item per line.
  2. Type what you want at the start of each line in the first box, and what you want at the end in the second box. You can fill in one or both.
  3. The result updates as you type. Copy it when it looks right.

Handy recipes

What you wantStartEndResult
Wrap in quotes for code"","apple",
SQL list'','apple',
Bullet list• • apple
Numbered list{n}. 1. apple
Hashtags##apple
HTML list items<li></li><li>apple</li>
Markdown checklist- [ ] - [ ] apple

Where this saves time

Developers use it to turn a plain list of IDs into an array or a SQL IN (...) clause. Marketers add hashtags to a list of keywords or UTM text to a list of links. Teachers and writers turn notes into numbered or bulleted lists. Anyone working with spreadsheets can add a fixed code, like a country prefix, to a whole column of values before pasting it back.

Tips

Frequently asked questions

How do I add a number to each line?

Type {n} in the prefix or suffix box. It is replaced with the line number, so a prefix of "{n}. " gives you 1., 2., 3. and so on. Change "Start numbers at" if you want to begin at a different number.

Can I add a comma to the end of every line except the last?

Add a comma as the suffix, then delete the one on the last line by hand. It takes a second and keeps the tool simple.

What happens to empty lines?

With "Skip empty lines" ticked, blank lines are left blank and do not get a prefix, suffix or number. Untick it if you want every line changed.

Can I add a space after the prefix?

Yes. Spaces count, so type the space right into the prefix box, for example "- " for a dash and a space.