Free Online Line Counter

A line counter counts exactly how many lines a block of text contains — every line, as defined by the line breaks in the text, regardless…

Need to use Line Counter right now?

A line counter counts exactly how many lines a block of text contains — every line, as defined by the line breaks in the text, regardless of how many words or characters each one holds. It's a narrower measurement than a word or character count, but it answers a specific, common question that those other counts can't: how many separate rows or entries does this content actually have?

No sign-upNo uploads 100% free

Your text

0total lines
0non-empty lines
0empty lines
0longest line (chars)

Features

  • Runs entirely in your browser
  • Privacy-first — your data is never uploaded
  • Real-time, instant results
  • 100% free, no sign-up required
  • Works on desktop, tablet, and mobile
  • No installation needed

Who uses this tool?

StudentsWritersBloggersEditorsContent marketersDevelopers

About Line Counter

A line counter counts exactly how many lines a block of text contains — every line, as defined by the line breaks in the text, regardless of how many words or characters each one holds. It's a narrower measurement than a word or character count, but it answers a specific, common question that those other counts can't: how many separate rows or entries does this content actually have?

This comes up constantly with structured, line-oriented data rather than flowing prose: counting how many rows are in a CSV file pasted as text, checking how many entries are in a list of email addresses or URLs before a bulk import, verifying that a code snippet or configuration file matches an expected line count, or checking a poem or song lyric's line structure against a required format. It's also useful as a quick sanity check before pasting content into a system with a per-line limit, like a form field that accepts one entry per line up to a maximum count.

Beyond the total line count, this tool breaks the count down further: non-empty lines (lines that contain at least one non-whitespace character) and empty lines (blank lines, including ones that contain only spaces or tabs) are counted separately, which is useful for spotting how much of a pasted block is actual content versus stray blank lines left over from copying out of a PDF, spreadsheet, or email. It also reports the length of the longest single line in the text, in characters — handy for checking whether any line in a code file or data export exceeds a specific width limit.

Everything is calculated instantly in your browser as you type or paste, with no limit on how many lines you can check — from a short 5-line list to a document with tens of thousands of lines.

How it works

  1. Paste your text. Drop in any line-based content — a list, a CSV export, code, or lyrics.
  2. Read the breakdown. Total lines, non-empty lines, empty lines, and the longest line's length all update instantly.

Examples

A short list with a blank line

Input

apple
banana

cherry

Output

4 total lines · 3 non-empty · 1 empty · longest line: 6 characters

Frequently asked questions