Prefix/Suffix Adder
Add a prefix (front) and suffix (back) string to each line in bulk.
Category: Text Tools
When to use?
Use it to wrap a value list in quotes for a SQL IN clause, prepend a path to a filename list, or add a comma after each item — bulk-editing many lines without a text editor.
How to use
- Paste text.
- Enter the prefix and suffix to add.
- Copy the converted result.
Input Explanation
Enter the prefix (added to the front) and suffix (added to the back) for each line. You can use just one.
Calculation Basis
It splits the input by line breaks and joins the prefix to the front and the suffix to the back of each line into a new string.
Usage Examples
- Process SQL value lists - Add quotes and commas to an item list for a SQL IN clause.
- Add file paths in bulk - Prepend a common path to each filename at once.
- Quote a list - Wrap items in quotes to match a code or data format.
Examples
- Prefix "'", suffix "'," + a value list → SQL IN-clause format 'apple', 'banana', 'cherry',
- Prefix "/src/" → prepend the path to each filename
Cautions
- Counts can vary by how spaces and line breaks are handled.
- An option lets you skip empty lines.
FAQ
Are prefix/suffix added to empty lines?
An option lets you skip empty lines.
Can I enter tabs or special characters?
Yes, escape characters like \t (tab) and \n are supported.
Can I add both prefix and suffix?
Yes. Enter both to apply them to the front and back of each line.
Can I add only one side?
Yes. Enter only a prefix or suffix to add to that position only.
Related Tools
- Line Filter - Filter lines of text by keyword include/exclude conditions.
- List Converter - Convert between a comma-separated list and a line-based list.
- Line Number Add/Remove - Add numbers to each line of text, or remove existing line numbers.
- Text Template Filler - Replace {variable} placeholders with your values in bulk.
- Character Counter - Count characters with and without spaces, and line count, in real time.
- Byte Counter - Calculate the byte length of text when stored as UTF-8.