Extract lines
Pull out a line range, the first or last N lines, or every Nth line.
Related tools
Extract lines
Pull exact lines out of any text by their line numbers — a range like 2-5, the first or last N lines, or every Nth line. Typical jobs: grabbing rows 100 to 200 from a long log, taking the header off a CSV export by keeping everything from line 2 on, sampling every 10th record from a data dump, or previewing just the first 20 lines of a file that is too big to skim.
In Range mode the field accepts flexible 1-based notation: a single number (3), a span (2-5), an open end (4- for everything from line 4 onward, -7 for everything up to line 7), and comma-separated combinations like 1,3,5-8. Parts that point past the end of the text are simply ignored, so 1-1000 on a 50-line file returns all 50 lines without complaint; only a spec the tool cannot read at all produces an error.
The other three modes use the N field instead. First N and Last N keep the head or tail of the text, and Every Nth keeps lines N, 2N, 3N and so on — every 2nd line, every 10th line. The Invert switch turns any selection into its opposite: instead of extracting lines 5-20 you delete them, and inverting First N strips a header block in one step.
Windows (CRLF) and Unix (LF) line endings are handled interchangeably, and the tally shows how many lines came in and how many went out. Everything runs locally in your browser — logs and exports never leave your device. Copy the result, download it as a .txt file, or send it to another tool for the next step.