ToolHome

Home / Tools / Text Line Slice Extractor

Free browser utility

Text Line Slice Extractor

Extract an inclusive range of numbered lines from pasted text while preserving spaces and blank lines, directly in your browser.

Extract a range of lines

Paste text and enter the first and last line numbers to keep. Both endpoints are included, and numbering starts at 1. For example, lines 2 through 3 of the sample return beta and gamma.

Whitespace and boundaries

Spaces and blank lines remain intact. Windows and old Mac line endings become LF newlines. A final newline terminates a line rather than creating an extra empty line. Output ends with a newline whenever a range is returned, so a final blank line remains distinguishable. The last line may exceed the text length; extraction stops at the end. A start beyond the end returns no lines.

Limits and privacy

Input is limited to 100,000 characters. Line numbers must be positive safe integers, and the last must not precede the first. Text processing takes place locally in your browser.

Related tools