Add a prefix and suffix to every line

Add text to the start and/or end of every line, e.g. quotes, bullets or commas.

Input

Output

Words 28Characters 193Without spaces 161Sentences 4Lines 9Paragraphs 2Reading time < 1 min

About Add Prefix / Suffix

Wrap each line of a list in whatever you need. Put “- ” in front to make bullet points, wrap values in quotes with a trailing comma for a code array or SQL IN list, or add <li> and </li> to build HTML.

Blank lines can be skipped so they stay empty. The edit is made in your browser and your text stays private.

How to use it

  1. Paste your lines into the Input box.
  2. Type a Prefix, a Suffix, or both. For example, prefix " and suffix ", turns each line into a quoted value.
  3. Keep Skip empty lines on to leave blank lines alone.
  4. Copy the result or press Use as input to keep editing.

Frequently asked questions

How do I quote every line for a SQL IN clause?

Set the prefix to ' and the suffix to ', (quote and comma). Remove the comma from the last line, then wrap the whole list in parentheses.

Can I add only a suffix?

Yes. Clear the Prefix box, which defaults to “- ”, and fill in just the Suffix.

Is there a quicker way to make a comma-separated list?

Yes. The comma-separated list tool joins lines with a separator and can add quotes in one step.

Related tools