Delete Every Nth Line
Paste plain text, choose a positive interval, and remove lines N, 2N, 3N, and so on locally in your browser.
A QUICK WALKTHROUGH
How to use this tool
- Enter up to 100,000 characters of plain text.
- Enter a positive whole number N.
- Delete every Nth line, then copy or download the result.
One-based line positions
Lines are counted from 1, so N, 2N, 3N, and later multiples are deleted. A value of 1 deletes every line.
Line endings and blank lines
LF, CRLF, and CR separators are accepted and the first detected separator is used in the output. Blank lines are real lines and are deleted when their one-based position is a multiple of N. A trailing newline remains represented by its final empty line, so it is preserved unless that final line is selected for deletion.
Local plain-text processing
The input is limited to 100,000 characters and 50,000 lines. Text stays in this browser; no upload or server processing is used.
GOOD TO KNOW
Common questions
Does N start counting at zero?
No. Counting is one-based: the first line is line 1.
What happens when N is 1?
Every line is selected, so the result is empty.
Are trailing newlines preserved?
Yes. A trailing newline is represented by a final empty line and remains unless that final line is the selected multiple of N.