Line Counter
Count total, non-empty, and blank lines in any text, with the breakdown shown instantly.
About Line Counter
Line counts matter far more than people expect. Code review metrics, translation quotes, poetry manuscripts, and submission rules all refer to line counts, and the number you think you have is often not the number you actually have once blank lines and trailing newlines are accounted for.
The tool shows total lines, non-empty lines, and blank lines in one glance. A trailing newline does not add an invisible extra line, following common editor behavior, and lines containing only spaces are trimmed and counted as blank. The breakdown helps you see the structure of your text, not just a raw total.
Editors, proofreaders, and translators use line counts for quoting and billing, while developers check formatting and configuration files. Students and authors verifying that a manuscript meets line-based submission requirements find the per-category breakdown especially handy.
How to Use
- Paste your text into the input area.
- Read the total line count immediately.
- Check the non-empty and blank line breakdown.
Example
line one line three 3 total lines · 2 non-empty · 1 blank
The input has three lines total, but the middle one is blank, leaving two non-empty lines.
FAQ
Does a trailing newline add a line?
The tool follows common editor behavior: an empty final line after a trailing newline is not counted as a separate line.
What counts as a blank line?
A line with no characters at all. Lines containing only spaces are trimmed and counted as blank too.
Why would I need a line count?
Code review, translation quoting, and word-count limits for submissions are the most common reasons to know exactly how many lines you have.
How are lines with only spaces handled?
Lines that contain only spaces or tabs are trimmed before counting and reported as blank, so indentation alone never inflates your non-empty line count.
Does the count change if I paste from a PDF?
It can, because PDFs often carry odd line breaks from the original layout. If a paragraph appears as several lines in your paste, that is exactly what the tool counts.