Skip to content
Tezmy Tools

Add Prefix and Suffix to Lines

Add text, numbers or quotes to every line, or join lines into one list

Quick recipes

Runs in your browser. Nothing is uploaded.

About the Add Prefix and Suffix to Lines

This tool decorates every line of your text. Type something to add before each line and something to add after it, turn on numbering with your own start, step, zero padding and separator, wrap each line in double quotes, single quotes or backticks, and join all the lines into one with a separator such as a comma. Quick recipe buttons set everything up for a bullet list, a numbered list, an SQL IN list, a CSV row, HTML list items or quoted lines. Empty lines stay empty and are not numbered, unless you choose to skip them, and each line can be trimmed first. The result updates as you type. It works on lines of text only. SQL-style quoting doubles single quotes, but it is not a full SQL escape, so do not paste untrusted text into database queries. Your text stays in your browser.

Updated September 2026

How to use the Add Prefix and Suffix to Lines

  1. 1Paste your lines into the box, one item per line.
  2. 2Type what to add before and after each line, or press a recipe such as SQL IN list.
  3. 3Turn on Number the lines, wrap in quotes or join the lines with a separator if you need them.
  4. 4Copy the result or download it.

Prefix, suffix and numbers

Adding the same text to the start or end of many lines by hand is slow and easy to get wrong. Type the text once and it goes on every line. A prefix of a dash and a space makes a bullet list, a prefix of two slashes comments out lines of code, and a suffix of a semicolon finishes lines in a script.

Numbering can start anywhere and count in any step, even downwards. Zero padding makes numbers a fixed width, such as 001, 002, which keeps them in order when sorted. The separator goes between the number and the line, and the number can go before or after it.

Quotes and commas for code

Wrapping puts quote marks around each line, and joining puts everything on one line. Together they turn a column of values into a list ready to paste into code, a query or a spreadsheet formula. Double quotes are doubled inside the line, as in CSV. Single quotes are doubled inside the line, as in SQL. Backticks are useful for names in code.

Handy recipes

  • Bullet list: a dash and a space before each line.
  • Numbered list: numbers with a full stop after them.
  • SQL IN list: single quotes around each line, joined with a comma and a space.
  • CSV row: double quotes around each line, joined with a comma.
  • HTML list items: li tags before and after each line.
  • Quoted lines: double quotes around each line.

Working with big lists

The tool copes with long lists and works on a debounced copy of your text, so typing stays smooth. Text over two million characters is refused with a message. Use Trim each line to remove stray spaces from copied lists. To put the lines in order first, try Sort Lines, and to remove repeats use Remove Duplicate Lines. To do the opposite and join lines into paragraphs, use Remove Line Breaks.

Features

  • Text before and after every line
  • Line numbers with start, step, padding and separator
  • Number before or after the line
  • Wrap in double quotes, single quotes (SQL style) or backticks
  • Join all lines into one with any separator
  • Trim lines and skip empty lines
  • Recipes for bullets, SQL, CSV and HTML
  • Copy or download the result

Frequently asked questions

How do I add text to the start of every line?

Paste your lines and type the text in Add before each line. For example, a dash and a space makes a bullet list. Type something in Add after each line to put text at the end of every line as well.

How do I add line numbers to a list?

Tick Number the lines. By default the numbers start at 1, go up by 1 and are followed by a full stop and a space. You can change the start, the step, the zero padding, the separator and whether the number goes before or after the line. Empty lines do not use up a number.

How do I turn a list into a comma-separated line?

Type a comma and a space in Join all lines with. Every line is put into one line with that separator between them. Empty lines are dropped when joining. Wrap the items in quotes first if you need a list of text values.

How do I put quotes around each line?

Choose Double quotes in Wrap each line in. Any double quote inside a line is doubled, as CSV files expect. Choose single quotes for SQL, where any single quote inside is doubled, or backticks for code.

How do I make a list for an SQL IN clause?

Press the SQL IN list recipe. It wraps each line in single quotes and joins them with a comma and a space, so a, b, c becomes 'a', 'b', 'c'. Put the result inside IN ( ). The quoting is not a full escape, so use proper query parameters for untrusted text.

Can I skip empty lines?

Yes, tick Skip empty lines to remove them from the output. If you leave it off, empty lines stay empty in the result and are not decorated or numbered. Blank lines are always dropped when you join lines into one.

Related tools