Line Counter
Count lines in a text passage. Processing for supported tools happens locally in your browser.
Count lines in a text passage. Processing for supported tools happens locally in your browser.
A line counter is useful for checking a list, transcript, code snippet or pasted document. Add the text and review how blank lines and line breaks contribute to the count.
Some editors do not count the empty line after the last line break, and files from different systems use different line-ending characters, although the tool treats all common types as line breaks. If a number matters, for example when loading data into another program, compare the count with that program and look for blank lines at the end of the text.
Editors may treat a final newline, blank lines or different line-ending characters differently.
The display follows the tool’s line-counting behavior. Inspect the text and compare with the destination if blank lines matter.
Probably a blank line at the end of the text. Delete it and count again.
0 lines.
Paste the text one, an empty line, two, three, and a final line break. The tool reports 5 total lines: 3 lines with text and 2 blank lines. The final line break creates the empty fifth line, which is why some editors show a lower number.
Want more detail, examples and answers to common questions? Read the Line Counter guide.