Delete Last Word Each Line
Paste multi-line text and delete only the last token on each line locally in your browser.
Delete last word on each line
Whitespace separates tokens. Empty and whitespace-only lines stay unchanged; line endings are preserved. Up to 100,000 characters.
A QUICK WALKTHROUGH
How to use this tool
- Enter up to 100,000 characters of text.
- Choose Delete last word to process each line independently.
- Review the result, then copy or download it as plain text.
Whitespace tokenization
A token is a contiguous run of non-whitespace characters. The final token is removed from each line that contains one, so punctuation attached to it is removed too. Leading whitespace, whitespace before the token, and trailing whitespace are preserved.
Line and empty-line boundaries
CRLF, LF, and CR line endings are recognized and retained exactly. Empty and whitespace-only lines are unchanged, and a final line ending does not create an extra deletion across the boundary. Processing, copying, and TXT download stay in this browser.
GOOD TO KNOW
Common questions
Does punctuation count as part of the last word?
Yes. Whitespace defines tokens, so punctuation attached to the final token is removed with it.
What happens to an empty line?
It stays unchanged. Whitespace-only lines are also preserved exactly.
Are line endings changed?
No. LF, CRLF, and CR line endings remain as supplied.