About Line Range Extractor
Extract any specific section from a multi-line document by providing start and end line numbers (1-indexed). Useful for picking sections from logs, code files, or data exports. Runs entirely in your browser.
Extract any specific section from a multi-line document by providing start and end line numbers (1-indexed). Useful for picking sections from logs, code files, or data exports. Runs entirely in your browser.
Paste your text, type the start and end line numbers, and the tool returns just that slice. Numbering is 1-indexed and the range is inclusive on both ends — entering 1 to 10 returns ten lines, the same convention used by sed -n '1,10p' and by most editor 'go to line' boxes.
If the end line is past the end of the input, the tool returns everything from start to EOF rather than throwing an error. If start is greater than end, the values are swapped automatically. The summary row shows the total line count of your input so you can quickly choose a sensible range.
1-indexed — line 1 is the first line, matching the convention of every editor's 'go to line' box and sed.
You get everything from the start line to the end of the input. No error — the tool clamps the range to what exists.
Yes — selecting 5 to 10 returns six lines (5, 6, 7, 8, 9, 10).
Not in one pass — run the tool twice and concatenate the results. A multi-range mode is on the wish list.
Explore the full suite of TEXT tools and 290+ other free utilities at Chunky Munster.