Text, files & data

Sample rows without a formula

Keep or delete every Nth line

Extract every second, fifth, tenth, or custom line from a list, log, transcript, or exported dataset.

Free browser tool

Extract lines at a repeating interval

Set the interval and starting position, then choose whether matching lines are kept or removed. Blank lines can count or be skipped.

Processed in your browser

Copy or download the result

No account. No signup.

How it works

How repeating line extraction works

A line matches when its counted position is the starting position plus a multiple of the chosen interval.

  1. Paste the source text

    Each newline creates one row that can be counted by the extractor.

  2. Set N and the start

    N controls the interval. The starting line shifts which repeating sequence is selected.

  3. Keep or delete matches

    Keep creates a sample containing only matched rows; Delete removes those rows instead.

  4. Control blank lines

    Choose whether empty lines advance the interval or remain outside the count.

Quick example

Keep every third row

Starting at line 1, the example keeps rows 1, 4, 7, and 10.

Common questions

Every Nth line extractor FAQ

How do I keep the even-numbered lines?

Set Every Nth line to 2 and Start counting at line to 2.

How do I keep the odd-numbered lines?

Set the interval to 2 and the starting line to 1, which selects lines 1, 3, 5, and so on.

Can I remove every tenth line instead of keeping it?

Yes. Set N to 10 and choose Delete matching lines.

Are large logs uploaded for processing?

No. The filtering happens in your browser and supports up to one million pasted characters.