You have a list of values. You need to wrap each item in quotes, add a comma, or prepend a URL. Doing it manually for 200 lines would take 15 minutes and introduce errors. Doing it with an Excel formula works but requires setup you'll forget by next time. A dedicated prefix/suffix tool does it in three seconds — paste, type the character, copy the result.
What Is a Prefix and What Is a Suffix?
A prefix is text added to the beginning of each line. A suffix is text added to the end. Both can be applied simultaneously. For example: prefix " and suffix ", wraps each line in double quotes with a trailing comma — the format needed for a JavaScript array or Python list.
In programming contexts, prefix is often called prepend and suffix is called append. The terms are interchangeable in everyday usage.
5 Common Use Cases
- SQL IN() list: Paste your IDs, apply single-quote prefix +
',suffix, wrap inIN( ... ). Saves 10 minutes of manual editing every time. - JavaScript/Python array: Double-quote wrap + comma suffix, then manually add
[and]. Done in under 10 seconds. - Markdown bullet list: Prefix
-converts any plain list into a Markdown unordered list. - Prepend a base URL: Prefix
https://example.com/to a list of slugs to build full URLs for a redirect map or sitemap. - Add hashtags: Prefix
#to a list of keywords to instantly generate Instagram or LinkedIn hashtag blocks.
How to Do It in Excel (and Why the Browser Tool Is Faster)
In Excel: =CONCATENATE("prefix", A1, "suffix") or ="prefix"&A1&"suffix". You need to: create a helper column, apply the formula, drag it down, copy-paste-as-values to strip the formula, then clean up. That's five steps.
With a browser-based prefix/suffix tool: paste your list, type the prefix, type the suffix, click copy. That's four actions total and the result is ready for wherever you need it — no extra columns, no formula cleanup.
Handling Edge Cases: Empty Lines and Whitespace
Two options to watch for:
Skip empty lines: If your list has blank lines (paragraph breaks), enabling this option leaves them untouched. Useful when you want to preserve visual grouping in the output.
Trim whitespace: Strips leading and trailing spaces from each line before applying prefix/suffix. Useful when pasting from Excel or CSV where values sometimes have invisible trailing spaces that break SQL queries.
Try the Free Tool
Prepend or append text to every line instantly — no signup, no install, runs in your browser.
Add Prefix / Suffix Now →Frequently Asked Questions
How do I add a prefix to each line in Notepad?
Notepad doesn't have a built-in multi-line prefix tool. You have two options: use the Find & Replace function in Notepad++ (with regex: find ^ and replace with your prefix), or paste your text into an online prefix tool like this one — instant results with no software required.
How do I prepend text to multiple lines in Excel?
Use a helper column with the formula =CONCATENATE("your-prefix", A1) or ="your-prefix"&A1. Copy the formula down, then copy-paste as values. For a faster one-time operation, paste your column into a browser-based prefix tool instead.
How do I build a SQL IN() list from a spreadsheet?
Copy your column of values, paste into the prefix/suffix tool, set prefix to a single quote (') and suffix to a comma and closing quote (',). The result is ready to paste inside IN( ... ) in your SQL query. Enable 'Skip empty lines' to avoid stray entries from blank rows.
Can I add a prefix and suffix at the same time?
Yes — fill in both fields simultaneously. The tool wraps each line: prefix + line + suffix. For example, prefix '"' and suffix '"' wraps every line in double quotes.