Add Prefix and Suffix to Text

Paste your lines, type what goes before and after each one, and press Add prefix and suffix. Templates fill in quotes, HTML list tags, bullets, and brackets.

Try an example
Templates

About this prefix and suffix tool

This tool adds the same text before and after every line of a list, which saves retyping when you prepare data. Wrap values in quotes and commas to paste them into code or an SQL IN list, turn plain lines into HTML <li> items or Markdown bullets, or put brackets around tags. You can also work word by word or on items separated by any delimiter, number the items, trim stray spaces, and skip empty lines. Nothing inside each line changes.

How to add a prefix and suffix

  1. Paste your list. Put each item on its own line, or press an example. An example only fills the box.
  2. Set the prefix and suffix. Type them, or press a template to fill both fields. Choose whether to wrap each line, each word, or each item between a delimiter.
  3. Pick the extras. Turn on Remove empty lines, Trim spaces, or Add numbers as needed.
  4. Press Add prefix and suffix. Copy the result or download it as a text file.

Frequently asked questions

How do I make a quoted, comma-separated list for code or SQL?

Press the Double quotes or Single quotes template. Each line becomes "value", with a comma after it. Remove the comma after the last line before pasting, or use Text to SQL List for a ready-made IN (…) clause.

What is the difference between the three modes?

Each line wraps every line of the text. Each word wraps every word and keeps the spaces between them. Each item between a delimiter splits the text at the delimiter you type, such as a comma, and wraps every piece.

Where do the numbers go?

In front of the prefix, so with the HTML list template and numbering on, a line becomes 1. <li>item</li>. The padded format adds a leading zero, such as 01. to 09.

Are empty lines wrapped too?

Yes, unless Remove empty lines is on. An empty line with the Double quotes template becomes "",.

Can the prefix or suffix contain spaces?

Yes. Everything you type is added exactly, including spaces. The Bullet template, for example, adds a hyphen followed by a space.