Add Prefix and Suffix to Lines

Wrap every line in text you specify — ideal for quoting a list, building SQL values or converting lines into HTML tags.

4Lines affected

Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.

What the Add Prefix and Suffix to Lines tool does

This add prefix and suffix to lines tool will wrap every line in text you specify — ideal for quoting a list, building SQL values or converting lines into HTML tags. Paste your text in, pick the options you need, and copy the result straight back out. It is most often used for turning a list of items into HTML <li> elements. People using this often want the email address extractor next.

How to use it

  1. Paste your list, one item per line.
  2. Type what should go before and after each line.
  3. Every line is wrapped immediately.
  4. Copy the result.

How it works

This is the fastest way to turn a plain list into structured output. A list of names becomes HTML list items, quoted SQL values, a CSS selector group or a set of command-line arguments, depending on what you put in the two fields.

Blank lines are skipped by default, since wrapping an empty line usually produces an empty element you then have to delete.

When to use it

  • Turning a list of items into HTML <li> elements.
  • Quoting a column of values for a SQL IN clause.
  • Adding a comment marker to each line of a block.

Common mistakes to avoid

  • Forgetting the comma when building a SQL or JSON list — put it in the suffix, then remove the trailing one.

Frequently asked questions

How do I build a SQL IN list?

Put an apostrophe in the prefix and an apostrophe-comma in the suffix, then delete the final comma from the result. The output is ready to paste between the brackets.

Can I add a prefix without a suffix?

Yes. Leave either field empty and only the other is applied.

Related tools

See all text & writing tools →