Line Counter

Six numbers at once: total lines, non-empty lines, blanks, unique lines, duplicates, and how long the longest line runs.

Total is rarely the number you want

Asking how many lines a file has usually means one of several different questions. The raw total counts every line including blanks, which is the number an editor shows you. Non-empty lines is the count of actual records, which is what matters when the blanks are just formatting. Unique lines tells you how many distinct values are present, and the gap between that and the non-empty count is your duplicate count, often the most informative number of the set, because it is the one that tells you an export ran twice. The longest line length matters when the destination has a per-row width limit.

Where the counts diverge

A file with 500 lines, 480 non-empty and 240 unique is telling you something specific: it has been concatenated from two copies of the same data. A file where the longest line is many times the average usually has one row where a delimiter was missed and several records ran together. Reading these numbers together is faster than scrolling, and because everything runs in the browser you can do it with a file you would not paste into a server-side tool, which is often exactly the kind of file a log or an export is.

Frequently asked questions

Does a trailing newline add a line to the count?

Yes, the raw total counts the empty final line the same way a text editor does. The non-empty count excludes it, which is usually the number you want.

How are duplicates counted?

As the difference between non-empty lines and unique lines, comparing trimmed text. Three copies of one line count as two duplicates.

Is my text uploaded anywhere?

No. Counting happens entirely in your browser, so nothing you paste leaves the machine.