Free online tools

Line Counter

Check a list, a draft, or an export before you use it elsewhere. See how many lines contain text, then copy a cleaned-up list that keeps the original order.

Enter your values

This tool processes your input in your browser.

Result

Read the counts

Paste one entry per line. A line made entirely of spaces or tabs is blank. A repeated line matches an earlier nonblank line exactly, so “Draft” and “draft” remain separate, as do entries with different leading or trailing spaces. In the sample, there are four lines, and the second copy of invoice-101 contributes one repeat.

Clean a list before you paste it elsewhere

Choose the deduplicated output when you want to keep the first occurrence of each entry. Choose the nonblank output when multiple appearances of an entry are meaningful. Both cleanup modes retain the spacing within each line and use a single newline between entries. Original text keeps the line breaks present in the input field.

Frequently asked questions

Does the final newline count as another line?

A final newline ends the line before it. One final newline adds no blank line. Two final newlines leave one blank line after the preceding text. An empty input contains zero lines.

Does a line wrapped on my screen count twice?

The tool uses explicit line breaks in the pasted text. Visual wrapping to fit the width of a screen leaves the count unchanged.

Can I count Windows and Unix text?

Yes. A Windows CRLF pair, a Unix LF, and a standalone carriage return each count as one line break.