Line Counter

Paste a list, poem, CSV or code and see how many lines it has, as you type: the total, how many have text, how many are blank, how many are unique, which line is longest and how long it is, and the average line length. The longest line is shown in full so you can find it.

What to do

Counts update as you type. Blank lines include lines with only spaces.

Your text
Longest line
Lines
0
Lines with text
0
Blank lines
0
Unique lines
0
Longest line
-
Longest line length
0
Average length
0
Characters
0

Everything runs in your browser. What you type never leaves this device.

Features

  • Total lines, lines with text and blank lines

  • Unique lines (ignoring blanks)

  • The longest line: its number, length and text

  • Average line length and total characters

  • Lengths count Unicode characters, not storage units, so Hindi letters are not double-counted

  • A trailing newline does not add a line

  • Runs in your browser: your text is never uploaded. Free, no signup

Why count lines

Lists and imports

Check that a list of numbers or emails has as many rows as you expect before importing it.

Poems, lyrics and scripts

Count lines for a competition limit or a reading slot.

Code and data files

Find the longest line before a style check or a fixed-width import complains.

How lines are counted

Rules

  • Each line break starts a new line; Windows (CRLF) and Mac/Linux (LF) endings count the same.
  • A single newline at the end of the text does not count as an extra empty line.
  • Blank lines include lines with only spaces, tabs or invisible spaces.
  • Line length counts Unicode characters (code points). A Hindi conjunct or an emoji with a skin tone is made of several, so it counts as more than one.

Need words or characters?

For words, sentences and reading time use the Word Counter; for a character limit use the Character Counter.

Other line tools

Line Counter - FAQ