Line Counter

Count the lines in any text or list: total lines, non-empty lines, unique lines and duplicates.

Paste a list and see how many lines it holds, how many are actually filled in, and how many are repeats.

  • 0Total lines
  • 0Non-empty
  • 0Unique
  • 0Duplicates
  • 0Characters
  • 0Avg. length

How Does It Work?

  1. Paste your listAnything with one item per line: emails, SKUs, URLs, names, log entries or code.
  2. Read the countsTotal lines includes blanks; non-empty ignores them. Unique and duplicate counts are based on the non-empty lines.
  3. Copy the numbered versionHandy when you need to refer to line 47 of a list in a message or ticket.

What Is It Used For?

Lists arrive as plain text far more often than as spreadsheets — pasted from an email, exported from a system, copied out of a log. Counting the lines, and knowing how many are repeats, is usually the first thing you want to know before doing anything with them.

  • Checking how many records are in a pasted export before importing them.
  • Verifying that a mailing list has the number of addresses you expect.
  • Counting lines of code or configuration in a snippet.
  • Spotting that a list contains duplicates before you act on it.
  • Referring to a specific line number when reporting a problem.

Examples

InputTotal linesNon-emptyUnique
3 items, no blanks333
3 items with a trailing blank line433
5 items, 2 repeated553
Empty box000

Frequently Asked Questions

How are lines counted?

Every line break starts a new line. A block with no line breaks at all counts as one line, and an empty box counts as zero.

Does a trailing blank line count?

Yes, in the total. It is excluded from the non-empty count, which is usually the figure you want for a list of records.

How are duplicates detected?

By comparing whole lines. Tick the option to ignore case and surrounding spaces if "Apple" and " apple " should count as the same item.

How do I remove the duplicates?

Use the Remove Duplicate Lines tool, which keeps the first occurrence of each line and tells you how many it removed.

Is there a limit on list size?

Only your browser memory. Lists with tens of thousands of lines are handled without difficulty.

Free. No registration. This tool runs entirely in your browser, so the data you enter stays on your device.