Home / Text and List Tools / Line Counter
Free online tool

Line Counter

Count total, non-empty and blank lines in pasted text while keeping the content in your browser. Processing takes place locally in your browser.

Start using

Line Counter

Each LF-delimited segment is one logical line. Windows CRLF and classic Mac CR are normalized to LF. For alpha, a blank line, then beta, the four results are 3, 3, 2, 1.

Ignore empty lines starts off. Turning it on changes only the first count to 2; total, non-empty and empty counts remain 3, 2, 1. A line containing only whitespace such as spaces or tabs is always classified as empty.

Empty input has one empty segment: results are 1, 1, 0, 1, or 0, 1, 0, 1 with the option on. A trailing newline adds an empty segment. Visual wrapping and selecting text do not change the input being counted. This tool counts lines, not words, paragraphs or pages.

Input is limited to 500,000 UTF-16 code units. Supplementary characters such as 😀 use two units each; this limit is not a 500,000-code-point allowance.

Processing takes place locally in your browser.