Line Counter

Count lines in your text instantly. Shows total lines, non-empty lines, paragraphs, and word count. Runs in your browser.

Private ● Runs entirely in your browser Your text never leaves your device.No account required.No data uploaded.Nothing stored unless you choose to save it.
Result
0 Lines

Paste or type text to begin.

Common Questions

What counts as a line?

A line is any sequence of text followed by a line break (newline character). A file with "Hello\nWorld" has 2 lines. A file with "Hello\n\nWorld" has 3 lines: "Hello", an empty line, and "World". Even the last line counts as one line, whether or not it ends with a newline.

What is the difference between total lines and non-empty lines?

Total lines counts every line including blank ones. Non-empty lines counts only lines that contain at least one non-whitespace character. If your text has blank lines between paragraphs, the total line count will be higher than the non-empty line count. Use non-empty lines when you want to count only lines with actual content.

What is the difference between lines and paragraphs?

A line is any text terminated by a single newline character. A paragraph is a block of text separated by one or more blank lines (double newlines). A paragraph may span multiple visual lines if it is long. Lines count every individual newline; paragraphs count the grouped blocks of content.

Does an empty document have 0 or 1 lines?

An empty document has 0 lines in this tool. The line count only activates once you have text. A document with a single word like "Hello" has 1 line. A document with "Hello\n" (including a trailing newline) also has 1 line.

When would I use a line counter?

Line counters are useful for developers checking line counts in code files, writers measuring the length of poetry or structured lists, data analysts checking the number of records in CSV or log data, and anyone who needs to verify how many lines a block of text contains.

Do blank lines count?

Yes, blank lines are included in the total line count. A line that contains only spaces or tabs is counted as one line in the total but is excluded from the non-empty line count. Use the Non-Empty Lines metric to see only lines with actual content.

How do I count rows in CSV data?

Paste the CSV data and read the line count, then subtract 1 for the header row. Each record sits on its own line ending in a newline character, so the line total equals your data rows plus the header. For example, a customer export with 200 people and one header line shows 201 lines, meaning 200 data rows. Read the non-empty line count to ignore any trailing blank line at the end of the file.

Do wrapped lines count as separate lines?

No, wrapped lines never count as separate lines. Word wrap is a visual effect where a long line reflows to fit a narrow box, and it inserts no newline character, so the count stays the same. For example, a 300-character sentence that spills across four rows in a slim textarea still counts as 1 line. Only a real newline, added when you press Enter, raises the line total.

What is the difference between a hard line break and a wrapped line?

A hard line break is a real newline character added when you press Enter, and it starts a new line in the count. A wrapped line is only the editor reflowing text to fit the box width, and it adds nothing to the total. For example, typing "Name" then Enter then "Email" gives 2 lines, but one long address that wraps across three rows stays 1 line. Resizing the window changes wrapping, never the line count.