How to use the Add Prefix & Suffix to Lines
- Paste your lines.
- Enter a prefix, a suffix, or both — or pick a preset.
- Optionally number lines or skip empty ones.
- Copy the result.
Example
| Input | apple banana |
|---|---|
| Result | "apple", "banana", |
What it does
Paste a list and the tool adds the same text to the start and end of every line. Type your own Prefix and Suffix, or pick a ready-made preset and the two boxes are filled in for you.
Presets
- Double-quoted, comma-separated: "apple", "banana", ready for code arrays and SQL lists.
- Single-quoted, comma-separated: the same with single quotes.
- HTML list items: wraps each line in <li> and </li>.
- Bullets: adds a • at the start of each line.
- Markdown list: adds “- ” at the start of each line.
- Checklist: adds “- [ ] ” for a task list.
- Parentheses: wraps each line in ( ).
Other options
- No suffix on last line (on by default): leaves the suffix off the final line, which is what you want after a comma-separated list.
- Skip empty lines (on by default): blank lines are left as they are and get no prefix or suffix.
- Number lines: adds 1., 1), 01 or #1 style numbers before the prefix, counting only the lines that were changed.
- Join into one line: puts everything on a single line separated by spaces, which is handy when you want one long string.
Practical uses
- Turning a column of words or IDs into a quoted, comma-separated list for code or a database query.
- Making an HTML or Markdown list from plain lines.
- Adding a URL base or a file extension to a list of names.
- Numbering items in a list quickly.
Related tools
Clean the list first with the Remove Duplicate Lines or Sort Lines Alphabetically. To change text inside the lines instead, use the Find and Replace.
Frequently asked questions
Can I number each line?
Yes. Tick “Number lines” and choose a format such as “1. ”, “1) ” or “01 ”.
How do I make a list for code or SQL?
Use the “Quoted, comma-separated” preset to turn a list into values like "apple", "banana" for arrays or SQL IN clauses.
How do I make a comma-separated list?
Choose the double-quoted or single-quoted preset for quoted items, or set the Suffix to a comma. Keep “No suffix on last line” ticked so the list does not end with a stray comma.
Can I use special characters in the prefix?
Yes. Whatever you type, including quotes, brackets and symbols, is added exactly as written.