Line Counter
Count total, non-empty and unique lines instantly.
Lines0
Characters0
Words0
What is this?
Line Counter tells you exactly how many lines your text contains — total, non-empty and unique — and can prefix each line with a number.
How it works
The tool splits your text on line breaks and reports the counts live. Enabling line numbers adds a padded index in front of every line so the columns stay aligned.
Examples
Basic line count
Input
Apple Banana Orange
Output
3 lines
Empty lines
Input
Apple Banana Orange
Output
5 total lines, 3 non-empty lines
Duplicate lines
Input
Apple Banana Apple Orange
Output
4 total lines, 3 unique lines
Numbered lines
Input
Apple Banana
Output
1 Apple 2 Banana
Use cases
- Count rows in a CSV or log file.
- Count lines of source code.
- Verify how many items are in a list.
- Count lines in notes, essays or documents.
- Add line numbers when referencing code or text.
- Check line limits for forms, submissions or imports.
FAQ
- How do I count the number of lines in a text?
- Paste your text into the Line Counter. The tool automatically counts every line separated by a line break and displays the total number of lines.
- What is a line counter?
- A line counter is a tool that counts the number of lines in a text. It can be useful for lists, code, logs, CSV data, notes and documents.
- Does an empty line count?
- Yes. Empty lines are included in the total line count. The non-empty line count excludes blank lines.
- Does the last line count without a newline?
- Yes. The final line is counted even when the text does not end with a newline character.
- How are unique lines counted?
- Unique lines are counted using an exact string comparison after splitting the text into separate lines.
- Can I count lines in a long text?
- Yes. Paste your text into the tool and the line count is calculated instantly as you type or paste content.