Line Counter
Count lines in any text or file: total, non-empty, blank, unique and the longest line.
How to use the Line Counter
- Paste text or open a filePaste anything, or open a .txt, .csv, .log or code file from your device.
- Read the countsSee total, non-empty, blank and unique lines, plus the longest line and average line length.
- Add line numbersCopy the numbered version in the format you need.
Example
The sample poem has 6 lines: 5 non-empty, 1 blank and 4 unique, because “Roses are red,” appears twice.
Open a 10,000-line log file and the counts appear instantly. Nothing is uploaded.
Frequently asked questions
Does a last empty line count?
If the text ends with a line break, the empty line after it is counted as one blank line, the same way most code editors number it.
How are unique lines counted?
Each different non-blank line is counted once. Lines must match exactly, including capital letters and spaces.
Is my file uploaded?
No. The file is read by your browser and never sent to a server.