Keep First N Lines
Trim a list down to just its first few lines. Great for previews and head limits. Free, no signup.
Scan to open on your phone
Point your phone camera at the code to open this tool.
Trim a list down to just its first few lines. Great for previews and head limits. Free, no signup.
How to use Keep First N Lines
- Paste or type your contentThe result appears as you type — there is no submit button.
- Set “Number of lines”
- Read and copy the resultThe output updates live and the copy button takes it in one click.
Worked example
- line 1 line 2 line 3 line 4 line 5
- line 1 line 2
Nothing you enter leaves your device
All of the work happens inside your browser. Whatever you type is never packaged up and sent to a server, and no request this page makes carries it.
That makes it safe for contract amounts, personal details and internal documents you would rather not hand to a third party — close the tab and it is gone.
What this tool does not do
Keep First N Lines only does what a browser can do on its own — it talks to no backend service. So it keeps no history for you and syncs nothing across devices; if you need a record, copy or download the result.
It is also not a substitute for professional judgement. For legal, medical or tax decisions, treat the output as a starting point rather than a final answer.
Frequently Asked Questions
- What if I ask for more lines than exist?
- You simply get the whole list back, with no error.
- Is this like the head command?
- Yes. It returns the first N lines, just like head in a terminal.