About
Wrap multiple lines of text with a desired prefix and/or suffix. The prefix will be inserted at the start of each line, and the suffix will be added at the end. Leave the text box empty to skip adding a prefix or suffix.
Exclude Empty Lines
The tool includes an option that allows you to exclude empty lines. If a line doesn't contain any text, no prefix or suffix will be added. The default setting is on.
Prefix “ and Suffix ”.
Enabled
“ABC”
“123”
“XYZ”
Disabled
“ABC”
“”
“123”
“”
“XYZ”
Basic Example
Prefix <li> and Suffix </li>.
Apple
Banana
Orange
Result
<li>Apple</li>
<li>Banana</li>
<li>Orange</li>
Wrap text lines with a prefix, suffix, or both. Prepare quoted lists, markup fragments, or repeated labels without editing each line.
How to use
Paste the lines and enter the text to add before and after them. Leave either field empty when you need only one side. Check the empty line option.
Example
Prefix <li> and suffix </li> turn Apple into <li>Apple</li> on each populated line.
FAQ
Does this escape the line content?
No. It adds literal text. Escape special characters first when turning untrusted values into HTML or another structured format.
A practical task
For a list of sample filenames, add a common directory prefix without changing the names themselves. For markup, wrap each value only after checking its contents. The tool adds characters; it does not validate a path or an HTML fragment.
Another useful question
How do I leave blank lines alone?
Enable the empty line option and inspect lines containing spaces too. A visually blank row can contain characters and therefore behave differently from a truly empty row.
Details for interpreting the result
| Detail | Explanation |
|---|---|
| Literal separators | A literal separator is an exact sequence of characters, including any spaces. A comma and a comma followed by a space are different separators. Match the source consistently before extracting or exchanging fields. |
| HTML and plain text | HTML tags describe structure. Plain text displays characters without interpreting them as tags. Decide which result you need before removing markup, escaping brackets, or pasting output into an editor. |
| Escaping and sanitizing | Escaping represents special characters literally. Sanitizing removes or changes unsafe markup according to rules. Neither operation should be replaced by assuming that unknown input contains harmless display text. |
| HTML character references | Character references such as & describe a character inside HTML. A reference can be escaped again when nested in another source. Decoding one layer is different from decoding every layer of a value. |