Add Prefix & Suffix
Add custom text before (prefix) and/or after (suffix) every line in your text.
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.
See also: Add Line Numbers, Repeat Text, Find & Replace, Text to Comma List
apple
banana→"apple",
"banana",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.
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.
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.
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.
Related Tools
Last reviewed: August 2026