Line Counter
Count total lines, non-empty lines and unique lines in any text instantly. See all three stats at once for lists, logs and code. 100% in-browser.
What is the Line Counter?
Line Counter tells you exactly how many lines your text contains — the total number of lines, how many are non-empty, and how many are unique.
- Counts total, non-empty and unique lines
- All three stats shown at once
- Updates live as you edit
- Works on lists, logs, code and more
- Runs locally — your text is never uploaded
How to use the Line Counter
- 1
Paste or type your text into the input box.
- 2
Read the total, non-empty and unique line counts shown above.
- 3
Edit the text to see the counts update in real time.
- 4
Use the numbers to verify or clean up your list.
About the Line Counter
Line Counter tells you exactly how many lines your text contains — the total number of lines, how many are non-empty, and how many are unique. Paste any list, log file or block of code and all three numbers update instantly.
It is handy for checking list sizes, spotting empty rows, measuring how much duplication exists, or verifying record counts before an import. Seeing total, non-empty and unique counts side by side makes the shape of your data clear at a glance.
The counting is done entirely in your browser, so nothing is uploaded. Your text stays private and the tool works offline whenever you need a quick, reliable line count.
Frequently asked questions
What is the difference between total and non-empty lines?
Total lines counts every line including blank ones. Non-empty lines counts only lines that contain visible characters.
How are unique lines counted?
Unique lines is the number of distinct line values, so lines that appear more than once are only counted a single time.
Does it count a trailing empty line?
A trailing newline creates one final empty line, which is included in the total but not in the non-empty count.
Is my text uploaded to count it?
No. All counting happens in your browser, so your data stays on your device and the tool works offline.
Guides for Line Counter
Related tools
Word Counter
Count words, characters, sentences, paragraphs and estimated reading time instantly. Free online word counter for essays, blogs and social media.
Find Duplicate Lines
Find and list every line that appears more than once, with its exact occurrence count. Optional case-insensitive matching. Runs 100% in your browser.
Remove Duplicate Lines
Delete duplicate lines from any list or text instantly. Case-insensitive matching, whitespace trimming and keep-first or keep-last options.
Remove Empty Lines
A free empty line remover that strips blank lines from text or code in one click. Optionally delete whitespace-only lines or collapse multiple blanks into one.
Sort Lines
Sort lines of text alphabetically A to Z or Z to A, by length, numerically, or shuffle randomly. Options to ignore case and remove duplicates.