Web Analytics

 Count lines

Count the total, non-empty, and empty lines in your text instantly. This free browser-based line counter supports Windows, Unix, and Mac line endings without sending your text to a server.

Line counter
The line counts update instantly while you type.
Text statistics
Total lines
0
Non-empty lines
0
Empty lines
0

Count lines Online

The Count lines tool counts lines in text instantly and privately in your browser. It shows total lines, non-empty lines, and empty lines without changing the original text.


⭐ How the line counter works

The counter recognizes Windows (CRLF), Unix/Linux (LF), and classic Mac (CR) line endings. Empty input contains zero lines, and a final line break does not create an unexpected extra line.


🔎 Count empty and whitespace-only lines

Count empty lines is enabled by default. Enable Ignore whitespace-only lines when lines containing only spaces or tabs should be left out of the counts.


💡 Count lines example

The text Hello world, This is a test, a blank line, and Another line contains 4 total lines, 3 non-empty lines, and 1 empty line.


⚙️ Private browser-based counting

Results update as you type or paste. Your text remains in your browser and is not uploaded to a server.


This tool is also known as

  • count lines in text online
  • online line counter
  • count number of lines in text
  • count empty lines in text
  • text line count tool

Frequently Asked Questions

It counts the total, non-empty, and empty lines in text instantly in your browser.

Enter or paste text into the Text area and the line counts update automatically.

No. Empty input is counted as zero lines.

Yes. The tool supports Windows CRLF line endings as well as Unix LF and classic Mac CR line endings.

No. A final line break separates the preceding line without creating an unexpected additional line.

An empty line contains no characters between its surrounding line breaks.

A whitespace-only line contains spaces or tabs but no other text.

Yes. Enable Ignore whitespace-only lines to exclude them from the displayed counts.

The primary result changes to the number of non-empty lines, while the individual statistics remain visible.

Yes. The original text is never modified while it is being counted.

Yes. Unicode and multilingual text can be counted without changing the characters.

No. All counting happens locally in your browser and your text is not uploaded.

Our text tools

General
Text counters
Find in text
Text cleaning