Remove Prefix or Suffix is a free online tool for stripping matching text from the beginning, end, or both ends of every line. Paste text or upload a file, choose whether matching is case-sensitive, and get an updated list instantly without changing the rest of each line.
Use the Remove Prefix or Suffix tool to strip a specified text fragment from the start or end of every line in a list. It removes only a matching boundary string, leaving the rest of each line and all blank lines intact.
Matching uses literal text, not a regular expression. Each specified prefix or suffix is removed at most once per line. If a line does not start or end with the text, that line is left unchanged.
Prefix to remove: item-
Input:
item-apple
item-banana
cherry
Output:
apple
banana
cherry
Suffix to remove: .old
Input:
report.old
notes.old
image.png
Output:
report
notes
image.png
Text processing happens locally in your browser. Your input is not uploaded to a server.