Line Counter
Count total, non-empty and empty lines. Find the longest line, optionally strip blanks.
Quick answer: Count total, non-empty and empty lines. Find the longest line, optionally strip blanks.
Last updated
Frequently asked questions
- How do I count lines in a text?
- Paste the text and the counter shows total, non-empty and empty line counts plus the longest line — all live, no clicks needed.
- What's the difference between lines and sentences?
- Lines are visual rows separated by line breaks; sentences are grammatical units that may span multiple lines. For sentence counts, use the Sentence Counter.
- Do empty lines count?
- Yes — they're tracked separately so you see total, non-empty and empty counts. Toggle "Remove empty lines" to drop them from a clean copy.
- How do I count lines in a CSV?
- Paste the CSV (or open it and copy all). Each row is one line; the line count equals the row count if there are no embedded line breaks within quoted fields.
- How do I count lines in code?
- Paste the code into the text area. The counter ignores syntax — it simply counts every line, including blank lines and comments.
- Why do Windows and Mac line breaks differ?
- Windows uses CRLF (\r\n), Mac/Unix uses LF (\n). The counter normalises both, so the line count is the same regardless of where the text was created.
- Can I count lines from a pasted list?
- Yes. Drop a vertical list and the counter immediately shows how many items it contains.
- How do I remove empty lines?
- Toggle the "Remove empty lines" switch. The cleaned text is shown below — copy it with one click.
- Can I count lines in a file upload?
- Open the file and paste the contents. Counting happens locally, so even a long log file works in seconds.
- How do I count lines in a paragraph?
- A paragraph that wraps visually is still one line until you press enter. The counter measures actual line breaks, not visual wrapping.