Text Prefix Suffix Adder
Batch add prefix and suffix to each line of text
Input
Output
Readme
What are text prefixes and suffixes?
A prefix is a string added before existing text, while a suffix is a string added after it. In programming and data processing, adding prefixes and suffixes to lines of text is a common operation used for formatting output, preparing data for import, wrapping content in markup tags, or adding consistent markers to lists.
Manually editing each line to insert the same text at the beginning or end is tedious and error-prone, especially when dealing with hundreds or thousands of lines. Automating this process ensures consistency across every line and saves significant time.
Tool description
This tool adds a custom prefix, suffix, or both to every line of your input text simultaneously. Paste or type your multi-line text, specify the prefix and suffix values, and the output updates in real time. Options to skip empty lines and trim whitespace give you fine-grained control over how each line is processed.
Examples
Adding HTML list tags:
Input:
Apples
Bananas
CherriesPrefix: <li> | Suffix: </li>
Output:
<li>Apples</li>
<li>Bananas</li>
<li>Cherries</li>Adding SQL quote formatting:
Input:
john@example.com
jane@example.com
admin@example.comPrefix: (' | Suffix: '),
Output:
('john@example.com'),
('jane@example.com'),
('admin@example.com'),Adding bullet points:
Input:
Buy groceries
Walk the dog
Finish reportPrefix: •
Output:
• Buy groceries
• Walk the dog
• Finish reportFeatures
- Real-time processing — output updates instantly as you type prefix, suffix, or input text
- Skip empty lines — preserves blank lines without adding prefix/suffix to them
- Trim lines — removes leading and trailing whitespace from each line before adding prefix/suffix
- Independent prefix and suffix — use either one alone or both together
- One-click copy — copy the entire output to clipboard instantly
Use cases
- Wrapping lines in HTML or XML tags — quickly wrap list items, table rows, or other repeating elements in markup tags without a code editor
- Preparing SQL or CSV data — format raw values into quoted, comma-separated entries ready for database queries or spreadsheet imports
- Adding consistent markers to lists — prepend bullet points, numbering prefixes, or comment symbols to plain text lists
Options explained
- Prefix — text inserted at the beginning of each line
- Suffix — text appended at the end of each line
- Skip empty lines — when enabled, blank lines are left untouched instead of receiving the prefix and suffix (enabled by default)
- Trim lines — when enabled, leading and trailing whitespace is stripped from each line before the prefix and suffix are applied