Add Prefix and Suffix to Lines

Put Text Before and After Each Line.

Loading…

Wrap every line in quotes. Put a hyphen in front of each one. Add a comma to the end of each. These are two-second edits on one line and a dull job on five hundred.

Type what goes before and after, and every line is changed at once. You can then join the lines with commas, which turns a column of values into a list ready for a SQL IN clause or a code array.

How to use the Add Prefix and Suffix to Lines tool

  1. Paste your lines.
  2. Type the text to add before and after.
  3. Copy or download the result.
  • Quoting and comma-separating values for SQL or code
  • Turning plain lines into a Markdown or HTML list
  • Adding a domain to user names or a path to file names

Tips for the best result

  • Use \n for a line break and \t for a tab in the prefix or suffix.
  • For a SQL list, use a single quote before, a single quote after, and join with a comma.

Quick facts

PriceFree
Works withText
Where it runsIn your browser, on your device
AccountNot needed

Frequently asked questions

Can I add text only at the start?

Yes. Leave the other box empty.

Are empty lines changed?

Not while "skip empty lines" is ticked.

How do I remove a prefix instead?

Use Find and Replace.

Can I add a different number to each line?

That is what Add Line Numbers does.