Skip to content
TextArray
100% local

Remove last line

Delete the last N lines from your text.

Input
Output

Remove last line

Remove the final line or lines from your text without touching the rest. Paste any block of text and choose how many lines to cut from the end — the tool instantly shows the result, with the removed lines gone and everything else intact. Whether you need to strip a trailing blank line, drop an unwanted footer, or cut multiple lines in one go, this is the quickest way to trim the bottom.

Common uses include removing trailing blank lines that publishing systems insert, deleting unwanted log entries at the end of a file, trimming whitespace-only lines before copying text, stripping copyright footers from quoted material, or preparing data exports that have been polluted with summary rows. The live tally shows how many lines went in, how many remain, and how many were removed so you can verify the result before copying.

Everything runs in your browser. Your text never leaves your device, so it is safe for private notes, confidential data, or anything else you do not want online. Set the count and run the tool, then copy the cleaned output, download it as .txt, or send it to another tool for further processing.

FAQ

Can I remove more lines than exist?
Yes. If you set the count higher than the number of lines in your text, all lines are removed and the output is empty. The tally still shows exactly how many lines were removed.
Does it remove blank lines?
It removes lines, blank or not. If the last line is empty, it gets removed. If the second-to-last line is empty, it does not get removed unless you increase the count.
Can I change how many lines are removed?
Yes. The number option lets you remove 1 to 10,000 lines from the end. Set it and the output updates instantly, so you can experiment and verify before copying.
Is my text uploaded anywhere?
No. The tool runs entirely in your browser and your text never leaves your device.