What it is
The Line Counter counts the lines in a block of text or code, numbers them, and can remove the blank ones.
Where a line count is the unit that matters
Plenty of work is measured in lines rather than words. A list of emails or product codes, one per line, where the count is how many records you have. A code file, where a review or an estimate is quoted in lines. A CSV, where the line count minus the header is the row count. A subtitle file, where each line is a caption.
In all of those, opening a word processor to find out gives you the wrong number.
How to use it
- Paste the text or the code.
- Read the counts: total lines, non-empty lines, and how many were blank.
- Clean up if you need to, removing blank lines and copying the result.
Why two counts
Total and non-empty differ more than people expect, and which one you want depends on the job.
A list of records pasted from a spreadsheet often carries a trailing newline, so the total is one higher than the number of records. Code files use blank lines for readability, so a file with 400 total lines might hold 320 lines of actual code. Text copied from a PDF often has a blank line between every paragraph, doubling the total.
Counting both is the point: the difference between them tells you what you are actually holding.
Everything runs in your browser and nothing you paste is sent anywhere. Related: the character counter and the duplicate line remover.