Skip to content
NMSnabbit.

Remove Prefix From Each Line

Strip a prefix string from the start of every line.

Text Tools Runs in your browser

How do you remove a prefix from each line?

Feed it a bulleted list and the marker comes off every line: “- apples” becomes “apples” when you set the prefix to “- ”, dash and space included. Lines that never had the prefix are left alone rather than trimmed blindly, and the match is case-sensitive, so “INFO:” and “info:” are treated as different prefixes. The natural undo for the add-prefix tool.

How to use the Remove Prefix

  1. 1 Paste the list whose lines carry an unwanted start.
  2. 2 Enter the exact prefix, including any trailing space (“- ” for dash bullets).
  3. 3 Lines beginning with that string lose it; the rest stay put.
  4. 4 Copy the stripped list.

What you can use it for

  • Taking bullet markers like “- ” off a list.
  • Stripping a repeated label from each line.
  • Cleaning numbering or tags off log lines.
  • Reversing an earlier add-prefix pass.

Frequently asked questions

What about lines that lack the prefix?
They pass through untouched. The tool never trims characters blindly; it removes the string only where the line genuinely starts with it.
Does “Info:” match a line starting with “info:”?
No. Comparison is exact, capitalisation included, so run separate passes if your data mixes cases.
How do I remove a bullet and its space together?
Enter the prefix as “- ” with the trailing space. Whatever you type, spaces included, is what gets cut.

Related tools

More Text Tools

More tools like this:

All Text Tools