Line Counter

Count lines in any text or file: total, non-empty, blank, unique and the longest line.

FreeNo sign-upPrivate — runs in your browser
0Total lines
0Non-empty
0Blank
0Unique
0Longest line (chars)
0Average length

How to use the Line Counter

  1. Paste text or open a filePaste anything, or open a .txt, .csv, .log or code file from your device.
  2. Read the countsSee total, non-empty, blank and unique lines, plus the longest line and average line length.
  3. Add line numbersCopy the numbered version in the format you need.

Example

The sample poem has 6 lines: 5 non-empty, 1 blank and 4 unique, because “Roses are red,” appears twice.

Open a 10,000-line log file and the counts appear instantly. Nothing is uploaded.

Frequently asked questions

Does a last empty line count?

If the text ends with a line break, the empty line after it is counted as one blank line, the same way most code editors number it.

How are unique lines counted?

Each different non-blank line is counted once. Lines must match exactly, including capital letters and spaces.

Is my file uploaded?

No. The file is read by your browser and never sent to a server.

Popular posts from this blog

Character Counter

Speech to Text Online

Keyboard Tester