Line Counter
Paste a list, a log or a piece of code to count its lines. Blank lines are counted separately from lines with text.
Characters: 0Words: 0Lines: 0
- Words
- 0
- Characters
- 0
- Characters (no spaces)
- 0
- Lines
- 0
- Non-empty lines
- 0
- Sentences
- 0
- Paragraphs
- 0
- Reading time (min)
- 0
How lines are counted
Lines are separated by line breaks, so the count follows the Enter key, not the width of your screen. The panel shows both the total number of lines and the number of non-empty lines, so you can tell how many are blank.
When counting lines is useful
- Checking the length of a list of names, emails or web addresses.
- Counting the lines in a log file or a data export.
- Checking a poem, a script or song lyrics against a line limit.
- Measuring a short block of code.
Counting lines in other programs
- Microsoft Word: the status bar shows the page and word count, and Review, Word Count includes lines.
- Notepad++: the status bar at the bottom shows the total number of lines.
- Windows PowerShell: (Get-Content file.txt).Count counts the lines in a file.
- Mac and Linux terminal: wc -l file.txt prints the number of lines.
How to use the Line Counter tool
- Paste or type your text into the box.
- Read Lines (all lines) and Non-empty lines in the panel below.
- Click Remove empty lines if you want to delete the blank ones and count again.
Frequently asked questions
What counts as a line?
Every piece of text separated by a line break is one line. A blank line between two paragraphs counts as a line too.
What is the difference between Lines and Non-empty lines?
Lines counts every line, including blank ones. Non-empty lines counts only lines that contain something other than spaces.
Does a long paragraph that wraps count as many lines?
No. Lines are counted by line breaks you typed or pasted, not by how the text wraps on your screen.