Add Prefix Suffix Online — Bulk Prefix Adder, Add Text to Each Line
Add prefix and suffix to text lines with 6 powerful modes: Per-line (standard), Per-word, Per-character, Wrap entire text, Alternating odd/even lines, and Template mode with {{LINE}} {{N}} {{UPPER}} {{LOWER}} placeholders. Includes rotating multi-pair cycles, conditional regex filter, 14 quote-wrap presets, Remove mode, and 4 export formats. 100% client-side.
Prefix / Suffix Tool — Add Text to Each Line, Word, or Character
🔒 100% client-sideRate this tool
How useful was the Prefix/Suffix tool?
Add prefix and suffix to text in seconds
6 modes, 14 presets, rotating pairs, template mode, conditional filter, 4 export formats — all live.
Paste your text
Paste any text — keywords, URLs, code lines, names, items — one per line. Enable Live to see the result update instantly as you type. The stats panel shows line count and chars added immediately.
Choose a mode & preset
Select from 6 application modes. For standard bulk prefix/suffix, stay on Per Line. Pick a quick preset — double quotes, <li> tags, SQL quote, bullet, indent — or enter your own custom prefix and suffix. For dynamic output, switch to Template mode.
Fine-tune options
Enable Rotating pairs to cycle through multiple prefix/suffix pairs line by line. Use the Condition filter to apply only to matching lines. Set an Indent in spaces. Enable Trim to clean whitespace before wrapping, and Skip blank lines to preserve structure.
Export & copy
Switch between Plain text, HTML, JSON, and CSV export formats. Use Remove mode to strip existing prefixes/suffixes from already-processed text. Copy the output or Download as .txt.
Frequently asked questions
Everything about adding prefix and suffix to text lines, words, and characters.
hello world with prefix " and suffix ", the output is "hello world" — the whole line is wrapped. Per Word splits each line into individual words and wraps each word separately. For hello world with the same quotes, output is "hello" "world". Per Character wraps every single character individually. For abc with prefix [ and suffix ], output is [a][b][c]. Use Per Line for list formatting (SQL, HTML, CSV). Use Per Word for wrapping individual tokens in code or data. Use Per Character for visual effects, encoding, or character-level processing.[red]…[/red], [green]…[/green], [blue]…[/blue], a 6-line input would output red/green/blue/red/green/blue. Common use cases: generating alternating row colours in HTML table rows (<tr class="odd"> / <tr class="even">), building CSS variable definitions with cycling names, creating multi-colour formatted output, or generating test data with different prefixes for alternating database entries. You can add up to 10 pairs using the "+ Add pair" button.{{LINE}} is replaced with the original line content; {{N}} is replaced with the sequential line number (1, 2, 3…); {{UPPER}} is replaced with the line content converted to UPPERCASE; {{LOWER}} is replaced with the line content converted to lowercase; {{TRIM}} is replaced with the line content with whitespace stripped. For example, the template <a href="/products/{{LOWER}}" id="link-{{N}}">{{LINE}}</a> applied to Blue Widget on line 3 produces <a href="/products/blue widget" id="link-3">Blue Widget</a>. Template mode is the most powerful mode for generating structured output like HTML, SQL, XML, or configuration files where each line contributes to a complete statement.'apple', and you specify remove-prefix ' and remove-suffix ',, the output is apple. This is the exact reverse of the add operation and is useful when you need to clean up text that was previously formatted by this or another tool. Common use cases: stripping SQL quotes from a query result to get plain values, removing HTML tags from a list, or cleaning up a copied array of strings that has JavaScript quote syntax.<div> element and places them all inside a <div class="lt-output"> container. You can paste this directly into an HTML document. JSON export produces a properly formatted JSON array where each output line is a string element, with proper escaping of special characters. Ready to paste into JavaScript, Python, or any JSON-consuming system. CSV export wraps each output line in double quotes with proper CSV escaping (internal double quotes are doubled), and produces a single-column CSV. You can import this into Excel, Google Sheets, or any CSV-aware database tool. The CSV header row is "Content". All export formats are generated from the same processed output as the plain text view.<tr class="odd"> wrapper, even lines get <tr class="even">; alternating CSS classes — generating list items with alternating class names for zebra-striping; Q&A formatting — odd lines are questions (prefix Q: ), even lines are answers (prefix A: ); two-column output — odd lines get a left-column wrapper, even lines get right-column wrapper; diff-style output — odd lines get + prefix, even lines get - prefix to simulate a diff format.LazyTools vs other prefix/suffix tools
How we compare on features that developers, marketers, and data engineers actually need.
| Feature | LazyTools ✦ | browserling.com | onlinetexttools.com | miniwebtool.com | phrasefix.com |
|---|---|---|---|---|---|
| Per-line prefix + suffix | ✓ | ✓ | ✓ | ✓ | ✓ |
| Per-word prefix + suffix | ✓ | – | ✓ separate tool | – | – |
| Per-character prefix + suffix | ✓ | – | – | – | – |
| Wrap entire text (one prefix/suffix total) | ✓ | – | ✓ toggle | – | – |
| Alternating odd/even lines (2 different pairs) | ✓ | – | – | – | – |
| Template mode ({{LINE}} {{N}} {{UPPER}}…) | ✓ | – | – | – | – |
| Rotating multi-pair cycles (up to 10) | ✓ | – | – | – | – |
| Remove prefix/suffix mode | ✓ | – | ✓ separate tool | – | – |
| Conditional filter (regex match/not-match) | ✓ | – | – | – | – |
| 14 quick-wrap presets | ✓ | – | – | – | – |
| N-space indent control | ✓ | – | – | – | – |
| HTML / JSON / CSV export | ✓ 4 formats | – | – | – | – |
| Stats (processed / skipped / chars added) | ✓ | – | – | – | – |
| 100% client-side, no sign-up | ✓ | ✓ | ✓ | ✓ | ✓ |
Other tools you might find useful
Add Line Numbers
Number lines with 6 types, custom step, zero-pad, Roman numerals, and 4 export formats.
Use tool →Find and Replace
Find and replace text with regex support, bulk pairs, diff view, and undo history.
Use tool →Remove Line Breaks
Remove or replace line breaks with 5 cleaning modes including smart clean.
Use tool →Sort Text
Sort any text lines alphabetically, numerically, by length, or randomly.
Use tool →Reverse List Online
Reverse list order with 6 modes — lines, words, chars, block, rotate, interleave.
Use tool →Concatenate Text
Merge text with 5 modes: join, columns, interleave, cartesian product, and template.
Use tool →Remove Empty Lines
Remove blank lines with 5 modes including collapse, edges-only, and custom N.
Use tool →Word Count Online
Count words, characters, sentences, readability score, and keyword density.
Use tool →