Text Line Counter
Count the lines in your text — total, non-empty and empty — along with the longest and average line length, updating as you type. It's a quick, private way to check line counts for code, lists or logs without anything leaving your browser.
- 100% free
- Private & safe
- Runs in your browser
Why use Line Counter?
Line Counter is a fast, distraction-free way to work with text: paste your content, transform it, and copy the result instantly.
- Runs instantly in your browser — nothing to install, nothing uploaded.
- Completely free, with no account, no watermarks and no usage limits.
- Handles Total lines; Non-empty lines; Empty lines; Longest / average length.
- Paste or type your text.
- Works on any device — desktop, tablet and phone — and is fully keyboard accessible.
How to use Line Counter
- Paste or type your text.
- See total, non-empty and empty line counts update instantly.
- Review the longest and average line length.
- Copy your text if you need it elsewhere.
Examples
- Checking how many lines are in a block of code.
- Counting non-empty entries in a pasted list.
Supported formats & limits
- Total lines
- Non-empty lines
- Empty lines
- Longest / average length
Limitations
- A trailing newline is counted as ending the final line, matching most editors.
- Line length counts characters, including spaces.
Frequently asked questions
Does it count blank lines?
Yes — it reports total, non-empty and empty lines separately.
How is a line defined?
Text separated by line breaks; the final line counts even without a trailing newline.
Is my text uploaded?
No — counting happens in your browser.
Was this tool helpful?
Related tools
Word CounterCount words, characters, sentences and reading time as you type.Character CounterUnicode-aware character, word, line and byte counts with optional limits.Remove Duplicate LinesRemove repeated lines from text with case and whitespace options.Text SorterSort lines alphabetically, numerically or by length.