Add a prefix or suffix to every line

Paste a list and wrap every line with the text you choose. Presets for quotes, bullets, HTML list items and SQL lists, and an option to join everything into one line.

  • Free
  • No sign-up
  • Runs in your browser
add-prefix-suffix

100% private — your text is processed in your browser and never sent to any server.

How it works

Paste your lines

Names, ids, words, URLs or any list with one item per line.

Set the text to add

Type a prefix and a suffix, or use a preset such as quotes and comma.

Copy the result

Keep one line each, or join them into a single line.

Wrap every line of a list in one step

Turning a plain list into something a program can read usually means adding the same characters to every line: quotes and a comma for a list of strings, an opening and closing tag for HTML, a dash for a bullet list, a path in front of each file name or a semicolon at the end of each statement. Doing it by hand is dull and easy to get wrong, and it is a job for which a spreadsheet formula is overkill. Type the text to add before and after the lines, and every line is wrapped at once.

Presets for the usual cases

  • Quotes and comma: turns each line into "line",, ready to paste into an array in JavaScript, Python or JSON.
  • SQL list: wraps each line in single quotes and joins them with commas, so a column of ids becomes 'a', 'b', 'c' and is ready for an IN (…) filter.
  • Bullet and list items: adds a dash in front of each line or wraps it in <li> tags.

Presets only fill in the two text boxes, so you can adjust them afterwards, for example to change the quote style or add a table alias.

Join everything into one line

After adding the text, you can join the lines with a comma, a semicolon, a space or a pipe. This is what makes a column pasted from a spreadsheet usable inside a query, a formula or a command line. Blank lines are skipped when joining, so you do not get a stray separator at the end.

Blank lines and spaces

Blank lines are left alone by default so that they do not turn into a lone pair of quotes. You can also trim the spaces around each line before the text is added, which prevents values such as ' Ana ' from reaching your code.

What it does not do

The tool adds text as it is: it does not escape quotes or special characters inside the lines. If your lines contain quotes, apostrophes or backslashes, check the result before using it in a program or database.

Frequently asked questions

How do I put quotes around every line?
Use the "line", preset, or type a quote in both the prefix and suffix boxes. Add a comma to the suffix if you need one after each line.
How do I turn a column into a list for an SQL IN clause?
Paste the column, click the SQL list preset and copy the result: each value is quoted and separated by commas on one line. Add the brackets around it yourself.
Can I add text only at the start or only at the end?
Yes. Fill in just one of the two boxes and leave the other empty.
Are quotes inside my lines escaped?
No. The tool does not modify the text of the lines, so check for quotes or backslashes before using the result in code or SQL.
Can I join the lines into one?
Yes. Choose a separator in "Then join the lines". Blank lines are skipped when joining.
Is my list uploaded anywhere?
No. Everything happens in your browser.