Skip to content
TextArray
100% local

Extract last word

Get the last word from each line of text.

Input
Output

Extract last word

Extract the last word from every line of your text with a single click. This tool is useful when you need to isolate the final term from each line, whether you're processing data, cleaning logs, parsing files, or extracting keywords. Simply paste your text and the last word of each line is separated and displayed instantly.

The tool processes one line at a time, preserving the order and skipping any empty lines. It handles all kinds of whitespace — spaces, tabs, and mixed spacing between words — treating them all uniformly. Each line is trimmed before processing, so leading and trailing spaces don't affect which word is considered "last". The output shows only the extracted words, one per line, making it easy to copy, download, or send to another tool.

Everything runs entirely in your browser, so your text stays private and never leaves your device. The live tally shows how many lines were processed and how many words were extracted. This is especially useful when working with structured data, CSV files, log entries, or any text where the final column or term matters.

FAQ

What counts as the "last word" on a line?
The last word is whatever comes after the final whitespace on a line. Whitespace means spaces, tabs, or any combination of them. Empty lines are skipped entirely.
How does it handle empty lines?
Empty lines and lines with only whitespace are ignored. The tool only extracts words from lines that have content.
What if a line has only one word?
That single word is extracted as the last word of that line.
Is my text uploaded anywhere?
No. The extraction runs entirely in your browser and your text never leaves your device.