Add Prefix & Suffix to Lines — Wrap Every Line with Custom Text Instantly
You have 200 product names one per line and need them wrapped in SQL single quotes, or prefixed with "- " for a Markdown bullet list. This add prefix and suffix tool adds the same text before and/or after every line in one click — turning plain lists into SQL IN() clauses, JSON arrays, HTML list items, or Markdown bullet points. No signup, no character limit.
What Is Add Prefix & Suffix?
An add prefix/suffix tool prepends a specified string to the beginning and/or appends a string to the end of every line in your text. Enter a list of items, specify a prefix like "- " or a suffix like ";" and every line in your input receives the same addition. This bulk operation replaces what would otherwise be a tedious find-and-replace or manual edit of every line.
Adding prefixes and suffixes is an extremely common task in data preparation and content formatting. Developers add quote marks around every item in a list to create SQL IN() values or JavaScript array elements. Content writers add markdown list markers ("- ") to convert plain lists to formatted bullet points. Data processors add column delimiters to convert tab-separated lines to CSV. SEO specialists add tracking parameters to URL lists. The tool handles any list length instantly, saving time proportional to the number of lines.
apple
banana→"apple",
"banana",Key Features
Applies your prefix and/or suffix to every line simultaneously — 200 lines processed in the same time as one. Handles any list length without truncation.
Set prefix and suffix independently and apply both in a single pass. Prefix "<li>" and suffix "</li>" wraps every line in an HTML list item in one operation.
Choose to apply prefix/suffix to blank lines too (wrapping every row including empty ones) or skip empty lines — keeping your SQL or code output clean of empty entries.
Your list text never leaves your device. Safe for confidential data — customer names, internal codes, API keys — that must not be sent to an external server.
When to Use Add Prefix & Suffix
Use for wrapping lines in quotes for SQL IN clauses, adding bullet symbols, prepending list numbers, or formatting code arrays.
Leave prefix or suffix empty to add to only one side. Combine with "Sort Lines" for quick list formatting.
Who Should Use This Tool?
Wrap list items in quotes, add SQL syntax around values, and format plain text lists into array literals or query inputs.
Bulk-add markdown list markers, HTML tags, or formatting characters to plain text lists before importing to a CMS or document.
Add UTM parameters, tracking suffixes, or URL prefixes to bulk lists of links before importing to analytics or email platforms.
Key Use Cases
- →Wrap each item in a list with single quotes to create SQL IN() values: 'item1', 'item2', 'item3'.
- →Add "- " prefix to every line to convert a plain text list to a Markdown unordered bullet list.
- →Add a domain prefix to a list of URL paths to convert relative paths to absolute URLs.
- →Append a UTM tracking suffix to a bulk list of campaign URLs for import into an email marketing platform.
- →Add HTML list item tags (
- prefix and
suffix) to every line for quick HTML list markup generation.
Add Prefix & Suffix vs Other Formats
How this tool compares to related approaches and methods
| Method / Format | Best For |
|---|---|
| THISThis tool (Add Prefix/Suffix) | SQL lists, Markdown bullets, HTML list items — any bulk line wrapping |
| Python list comprehension | Programmatic transformation inside Python scripts |
| Excel CONCATENATE / & | Cell-by-cell wrapping in spreadsheets — requires paste-back to text |
| sed command (Unix) | Batch file processing in Unix/Linux terminal environments |
How to Use Add Prefix & Suffix
- Enter the text you want to search in the Find field.
- Enter the replacement text in the Replace with field.
- Paste your text into the Input Text box.
- The result appears instantly below. Click Copy to copy it.
This Converter vs Manual Methods
Why use this tool instead of doing it by hand?
| Method | Limitation |
|---|---|
| Manually adding prefix/suffix line-by-line | Impractical for 50+ lines; error-prone and count-tedious |
| Excel CONCATENATE or & operator | Requires paste-back from spreadsheet to text; extra step with column formatting |
| Python list comprehension | Requires Python interpreter and code knowledge |
| Word macro (VBA) | Requires VBA knowledge and macro setup — complex for non-developers |
| ✓ BESTThis tool | None |
Common Mistakes & Pro Tips
- !Adding a prefix with an extra space — "- item" (correct) vs "- item" (double space). Double-check the exact prefix string including spacing before applying to a large list.
- !Using this on multi-paragraph text — the tool adds the prefix/suffix to every line, including blank lines. Run Remove Empty Lines first if you don't want blank lines to receive the prefix/suffix.
- !Applying prefix/suffix to a list with trailing blank lines — the final blank lines in your input also receive the prefix and suffix, producing malformed empty items in SQL lists and array literals (e.g., '', at the end of an IN() clause). Always run Remove Empty Lines on your input first, or use the "skip empty lines" option if your tool supports it, before wrapping values with SQL quotes.
Frequently Asked Questions
Everything you need to know about Add Prefix & Suffix
How do I create a SQL IN() list with this tool?
+
To create a SQL IN() clause from a list of values: add a single-quote prefix (') and a single-quote-comma suffix (',). The result gives you 'value', per line. Then remove the trailing comma from the last line and wrap in IN(). For example, a list of three emails becomes: '[email protected]', / '[email protected]', / '[email protected]'. Wrap in IN() for: WHERE email IN ('[email protected]', '[email protected]', '[email protected]').
Can I add both a prefix and suffix at the same time?
+
Yes — most add-prefix-suffix tools allow you to enter both fields simultaneously and apply them in a single pass. Enter your prefix in the prefix field and your suffix in the suffix field. Every line receives both additions at once. For example, prefix "<li>" and suffix "</li>" wraps every line in an HTML list item tag in one operation.
What is the most common use case for adding prefixes to lists?
+
The single most common use case is converting a plain text list to a formatted list in the target markup language: adding "- " for Markdown bullet lists, adding "* " for alternative Markdown bullets, adding "• " for Unicode bullet points in plain text, adding numbers manually for numbered lists (though a dedicated line numbering tool is better for that). The second most common use is SQL value list formatting with quotes and commas.
How do I add a newline or tab character as part of the prefix?
+
In a browser text field, you typically can't type a newline as a prefix. For newline or tab as the prefix/suffix character, you'd need to use a code editor's find-and-replace with regex mode, or write a short script: Python's [f"\t{line}" for line in lines] adds a tab prefix to every line. Our browser tool is optimized for visible character prefixes and suffixes.
Can I use this to add line numbers as a prefix?
+
Not directly — line numbers need to increment for each line, which requires dynamic generation rather than a fixed prefix string. Use our Add Line Numbers tool specifically for sequential numbering. Add Prefix/Suffix is for fixed, identical strings added to every line. Combine them if needed: run Add Line Numbers first, then use Add Prefix/Suffix to add additional fixed content before or after the numbered lines.
How do I create a Markdown bullet list or task list from a plain list?
+
For a Markdown unordered bullet list: set prefix to "- " (dash and space). For a Markdown task list (checkboxes): set prefix to "- [ ] " (dash, space, open bracket, space, close bracket, space). For numbered lists that must increment: use the Add Line Numbers tool instead — it generates "1. Item", "2. Item" with auto-incrementing numbers. For nested lists, add extra spaces before the "- " prefix to create the correct indentation level.
What prefix/suffix combination creates a JavaScript or Python array from a list?
+
For a JavaScript array: set prefix to "'" (single quote) and suffix to "'," (single quote + comma), copy all items, remove the trailing comma from the last item, then wrap in square brackets: ['item1', 'item2', 'item3']. For a Python list it's the same syntax. If you want double-quoted strings, use " as prefix and ", as suffix. For a list of numbers (no quotes), skip prefix/suffix and just wrap the output in [ ] directly.