Text Prefix Suffix
Free online text prefix suffix tool, no installation required
About Text Prefix & Suffix
Text Prefix & Suffix adds or removes a prefix and/or suffix on every line of your input. It has two modes (Add and Remove) and an option to skip empty lines. The output updates live as you edit the input or any option.
How to Use
1. Paste your text into the Input Text area (each line is processed independently). 2. Enter a Prefix and/or Suffix string in the two fields. 3. Choose a mode with the Add / Remove tabs: - Add: prepends the prefix and appends the suffix to each line. - Remove: strips the prefix from the start and the suffix from the end of each line if present. 4. Toggle Skip Empty Lines to leave blank lines untouched (on by default). 5. The Output card updates live; click Copy to copy it.
Add and Remove Mode Details
In Add mode, each non-skipped line becomes prefix + line + suffix, so prefix "<li>" and suffix "</li>" wraps every line as an HTML list item. In Remove mode, the tool only strips an exact match: if a line starts with the prefix it removes that many leading characters, and if it then ends with the suffix it removes those trailing characters. Lines that do not start with the prefix or end with the suffix are passed through unchanged. Empty Prefix or Suffix disables that side of the operation.
▶Does the output update automatically?
▶What does Skip Empty Lines do?
▶In Remove mode, what happens if a line does not start with the prefix?
▶Can I use only a prefix or only a suffix?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee