Line Counter

Paste your text or drop a .txt file in, and get the line counts straight away.

Line stats

A line counter answers a question that sounds simple until you try to do it by hand. Paste your text and you get the total straight away, along with how many of those lines are blank, how many are genuinely unique, how many repeat, and how long the longest and shortest ones run.

Blank lines are the usual argument

Ask two people to count the lines in a file and they will often disagree by exactly the number of empty lines in it. A text editor counts every line including the empty ones, because it is showing you positions. Someone counting records in an export wants the empty ones ignored, because a blank line is not a record.

Rather than pick a side, the counter shows both and lets you decide which one is the answer. Tick the blank line option and the headline figure switches to the non-empty count while the raw total stays visible underneath it.

Finding repeated lines in a list

The unique and duplicate figures are what make this useful for list work. A list of two thousand email addresses that reports 1,847 unique lines has just told you something important, and it took a paste to find out.

Trailing spaces are the sneaky part of that. Two lines that look identical on screen are treated as different if one of them ends in a space, which is exactly how an export from a spreadsheet tends to arrive. Turn on trimming and the comparison happens after those invisible characters are stripped, which usually makes the duplicate count jump.

Line length figures and where they help

The longest line measurement earns its keep with fixed width data and imports. When a system rejects a file for exceeding a field width, the offending row is nearly always the longest line, and knowing it runs to 312 characters when the limit is 255 saves you scrolling through the file to find it.

Average line length is a quieter signal. On a CSV export, a wildly different average between two files usually means the column structure changed somewhere between them. Once you know how many lines you are dealing with, the add line numbers tool is the natural next step if you need to reference specific rows.

What you get

Total and non-empty

Both counts shown together so blank lines never cause confusion.

Unique and duplicate

See how many lines repeat, with an optional case insensitive check.

Length measurements

Longest, shortest, and average line length in characters.

Trim before counting

Strip trailing spaces so invisible characters do not hide duplicates.

Words and characters too

Whole text totals sit alongside the line figures.

Accepts dropped files

Pull a .txt or .log file straight onto the box.

Where people use it

Data imports

Confirm a CSV has the number of rows you were expecting before uploading it.

Log files

Count entries in an exported log without loading it into a heavier tool.

Mailing lists

Check how many addresses in a list are actually distinct.

Frequently asked questions