Add Prefix and Suffix to Lines
Add text to the start or end of every line, number a list, or turn lines into Markdown bullets, checklists, quoted CSV values or HTML list items.
Examples
Markdown Bullet List
Numbered List
Checklist
CSV Format
Related tools
Formatting a List Line by Line
Lists copied from a spreadsheet column, an email or a text file usually need the same few characters added to every line before they can be used somewhere else: a dash for a Markdown list, quotes and commas for code, or tags for HTML. Doing it by hand is slow and easy to get wrong on line 47 of 80.
result = prefix + [number] + line + suffix
Numbering is added after the prefix, so a prefix of Step with numbering and a colon gives Step 1: Preheat the oven. Blank lines are left untouched and are not counted.
Prefix and Suffix Recipes
| To get | Prefix | Suffix | Result |
|---|---|---|---|
| Markdown bullet list | - | โ | - apples - bananas |
| Markdown checklist | - [ ] | โ | - [ ] apples - [ ] bananas |
| JSON or Python array items | " | ", (no comma on last line) | "apples", "bananas" |
| SQL IN (...) values | ' | ', (no comma on last line) | 'apples', 'bananas' |
| HTML list items | <li> | </li> | <li>apples</li> <li>bananas</li> |
| Email or chat quote | > | โ | > apples > bananas |
| Code comments | // | โ | // apples // bananas |
| Hashtags | # | โ | #apples #bananas |
| Full URLs from paths | https://example.com/ | โ | https://example.com/apples https://example.com/bananas |
How to Add a Prefix or Suffix to Every Line
- 1Paste your list: Paste one item per line, from a spreadsheet column, a document or a text file; Windows and Mac line breaks both work.
- 2Choose a template or type your own: Pick Markdown bullet, numbered list, checklist, quote, code comment, CSV, quoted list or HTML <li>, or type any prefix and suffix yourself.
- 3Fine-tune the list: Turn on numbering with a start number and separator, remove empty lines, trim spaces, and drop the trailing comma from the last line.
- 4Copy the result: The formatted list updates as you type; copy it or download it as a TXT file.
Frequently Asked Questions
How do I add quotes and commas to each line?
Choose the "Quoted", list template. It wraps every line in double quotes and adds a comma, leaving the comma off the last line: apples, bananas and cherries become "apples", "bananas", "cherries", ready to paste into a JSON array, a Python list or a SQL IN (...) clause. For SQL, which uses single quotes, type ' as the prefix and ', as the suffix.
How do I number every line of a list?
Tick Enable numbering or pick the Numbered List template. You can start from any number and choose 1. 1) 1- or 1: as the style. Empty lines are skipped, so the numbers stay in sequence.
Can I add a prefix to lines in Excel or Google Sheets instead?
Yes, with a formula: ="- "&A1 in Excel or Google Sheets adds a prefix, and =A1&"," adds a suffix; then fill the formula down. This tool is quicker for a one-off list and keeps line breaks and blank lines as they are.
What happens to blank lines?
They are kept blank, without a prefix, suffix or number, so a list split into groups keeps its layout. Tick Remove empty lines to drop them altogether.
How do I make a Markdown checklist?
Use the Checklist template, which starts every line with - [ ] . GitHub, GitLab, Obsidian and many other Markdown editors show these as tick boxes; change [ ] to [x] to mark an item done.
Is my list uploaded anywhere?
No. We do not collect or store what you enter.
Related Tools
Paragraph Formatter
Clean text by fixing spaces, line breaks, and paragraph structure.
White Space Remover
Clean leading/trailing spaces, extra gaps, tabs, and empty lines.
Remove Duplicate Lines
Deduplicate line-based text with case, whitespace, and sort controls.
Find and Replace
Search and replace text with regex, batch rules, and preview controls.
Text Diff Checker
Compare text versions by line, word, or character with visual diff output.
Fancy Text Generator
Copy-and-paste bold, italic, script and bubble Unicode fonts.
Reading Time Calculator
Estimate read and speaking duration with multi-speed profiles, custom WPM, and badge-ready output.
HTML Entity Encoder / Decoder
Encode/decode HTML entities with named, decimal, hex, and auto-detect modes.
Word Counter
Count words, characters, sentences, paragraphs, and reading time.
Sentence Case Converter
Convert text to uppercase, lowercase, title case, or sentence case.
Keyword Density Checker
Analyze keyword frequency and density percentages for SEO writing.
Text Reverser Tool
Reverse letters, words, sentences, or paragraph order instantly.