Text tool

Delete Every Nth Line

Paste plain text, choose a positive interval, and remove lines N, 2N, 3N, and so on locally in your browser.

In-browser processingNo account requiredPrivacy details ↗

Maximum 100,000 characters and 50,000 lines. Lines are counted from 1; trailing newlines and blank lines are preserved unless selected.

Use a positive whole number. N = 1 deletes every line.

A QUICK WALKTHROUGH

How to use this tool

  1. Enter up to 100,000 characters of plain text.
  2. Enter a positive whole number N.
  3. 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.