How to use the add prefix and suffix to each line
- 1Paste your list into Lines to change, one item per line.
- 2Under Add, choose a ready-made format such as Double quotes and a comma, or keep My own prefix and suffix and type into Prefix and Suffix.
- 3Leave Skip empty lines and Trim spaces at line ends first ticked unless you need blank lines or spaces changed too.
- 4Press Copy or Download to take the result.
Example
red green blue
"red", "green", "blue"
Setting: Add = Double quotes and a comma. The trailing space after “blue” is trimmed, the empty line is skipped, and the last line gets no comma because No comma after the last line is ticked.
Adding a prefix to every line
Type the text you want in front of each line into Prefix. It is added exactly as typed, so include a trailing space if you want one, as in - for a bullet. Type \t for a tab.
Common prefixes: https:// to turn a list of domains into URLs, site: to build search operators, # to turn words into hashtags, and > to quote lines in an email or Markdown.
Adding a suffix to every line
The suffix goes after the last character of each line. With Trim spaces at line ends first ticked, invisible trailing spaces from spreadsheets are removed first, so the suffix sits right after the text. Typical suffixes are , for comma-separated values, ; for statements, .com for domain ideas, or near me for keyword variations.
Use prefix and suffix together: prefix <option> with suffix </option> turns a list into the options of an HTML select box.
Recipes: quotes, commas, HTML tags
| Choice under Add | apple becomes |
|---|---|
| Double quotes and a comma | "apple", |
| Single quotes and a comma (SQL) | 'apple', |
| HTML list items | <li>apple</li> |
| HTML links | <a href="apple">apple</a> |
| Markdown bullets | - apple |
The SQL format doubles any apostrophe inside a line (O'Neil becomes 'O''Neil',), which is how SQL escapes quotes. Wrap the result in IN ( … ) to use it in a query. No comma after the last line leaves the final item without a trailing comma, which some languages and SQL dialects reject.
Empty lines and whitespace
Blank lines are left alone by default so the layout of your text stays the same; untick Skip empty lines to give them a prefix and suffix too. A line that contains only spaces counts as empty. Windows (CRLF) line endings are converted first, so a suffix never lands after a hidden carriage return, a common cause of broken CSV and SQL lists.
Is my text private?
This tool runs entirely in your browser. Your text is not uploaded to our servers.
