Extract Lines (Head, Tail, Range)
Local ProcessingTake the first or last N lines, or a chosen line range.
How It Works & Processing Standards
Take the first or last N lines, or a chosen line range.
Tool processing runs in your browser. If you create a calculator or conversion share link, its values are included in the URL. See the privacy policy for account, analytics and advertising data.
Current Limits
- Maximum input length: 2,000,000 characters
Choose line range, head or tail under "Task". Handy for the latest part of a big log or the top of a table.
What You Can Do
- Line range
- From the start line to the end line, inclusive.
- Head
- The first N lines.
- Tail
- The last N lines.
How to Use Extract Lines (Head, Tail, Range)
- 1Choose a taskRange, head or tail.
- 2Enter numbersLines are numbered from 1.
- 3CopyCopy the extracted lines.
Examples
Lines 2 to 4
Input: 1 / 2 / 3 / 4 / 5 (2–4)
Result: 2 / 3 / 4
Last 2 lines
Input: 1 / 2 / 3 / 4 / 5 (tail 2)
Result: 4 / 5
Common Use Cases
- Viewing the latest entries of a log file
- Previewing the top of a CSV
- Quoting a section of a long document
Frequently Asked Questions (FAQ)
What if the range exceeds the line count?
Only existing lines are returned.
I want lines containing a word.
Use the Line Filter.
