Add Prefix and Suffix
Adds the text you choose to the start and end of every line in a list. It is handy for turning plain lines into bullet points, quoted items or comma-separated values. Use it when you need to prepare a list for a document, spreadsheet or piece of code without editing each line by hand.
How to use the Add Prefix and Suffix
- Paste your text, one item per line.
- Type the text to add at the start and end of each line, for example
-for a bullet list or,at the end. - Empty lines are left unchanged unless you turn that option off.
Limitations
- Prefix and suffix are added exactly as typed, including spaces.
- Very large inputs are refused if the result would be larger than 4 MiB.
Worked examples
Input
milk eggs bread
Result
- milk - eggs - bread
Input
One Two
Result
<li>One</li> <li>Two</li>
Practical uses
-
Turn a list into HTML items
A web editor has a plain list of 30 product names that each need to be wrapped in list tags. They type the opening tag as the prefix and the closing tag as the suffix, then paste the list. Every line is wrapped in one go, so nothing has to be retyped.
-
Quote values for a code snippet
A developer has a column of IDs on separate lines and wants an array for a code snippet. They enter a quote mark as the prefix and a quote mark followed by a comma as the suffix. The result is a list that can be pasted straight into the code.
-
Add dashes to a handout list
A teacher pastes a list of spelling words and types a dash and a space as the prefix. Each word gets its own bullet at the start of the line. The list is then ready to drop into a handout.
Related tools
Privacy: this tool runs entirely in your browser. Your text is not uploaded, logged or saved, and it is never sent to analytics. Maximum input: 1 MiB.