How to count lines in a pasted list or document
- Paste your text into the Text to analyze box, or type straight into it. You can also use Load from file or drop a text file (.txt, .csv, .md, .json, .log and similar) onto the box.
- Read the numbers under Text statistics. They update with every keystroke, so you don't have to press anything. Analyze text runs the same calculation on demand.
- Look at Total Lines for the line count. Next to it you'll see words, characters with and without spaces, UTF-8 bytes, paragraphs and an estimated reading time.
- Press Copy summary to copy all seven figures as plain text. You can paste that summary into a ticket, a spreadsheet note or a chat message. Download result saves the same summary as a .txt file.
- Use Clear to empty the box before you check the next text.
Examples: what gets counted
A three-item list without a final line break:
apple
banana
cherry
| Text | Total Lines | Total Words | Total Characters | UTF-8 Bytes |
|---|---|---|---|---|
apple, banana, cherry (no final Enter) |
3 | 3 | 19 | 19 |
| the same list ending with Enter | 4 | 3 | 20 | 20 |
a, b, empty line, c (Windows line endings) |
4 | 3 | 6 | 6 |
The second row matters most when you count lines. If the text ends with a line break, the tool counts the empty line after it, so you get one more than the number of items. Blank lines in the middle count as lines too. The third row has 4 lines but only 2 paragraphs, because the empty line splits it into two blocks.
Characters are counted the way a reader sees them, and bytes are counted the way a file stores them:
Zoë don't 👍🏽 café
This gives 3 words, 16 characters, 13 characters without spaces and 25 UTF-8 bytes: the thumbs-up with a skin-tone modifier is one character but 8 bytes, and "don't" stays one word because an apostrophe between letters keeps it together.
The summary you get from Copy summary for the built-in "Three lines" example looks like this:
Total Lines: 3
Total Words: 6
Total Characters: 20
Characters (no spaces): 15
UTF-8 Bytes: 20
Paragraphs: 1
Reading Time: 1 min
When a line count is the number you need
- Checking an export: you pasted a column of email addresses or order IDs from a spreadsheet and want to confirm the row count matches before importing it somewhere else.
- Log excerpts: you copied a chunk of a server log into a bug report and want to state how many entries it covers.
- Lists with a quota: keyword lists, allowlists or bulk-upload files often have a maximum number of entries. Count first, then trim.
- Byte limits: the bytes figure helps when a database column, an index or an API payload limits size in UTF-8 bytes rather than in characters. Text with accents or emoji uses more bytes than it has characters.
- Writing targets: words and reading time (about 200 words per minute, rounded up) give a quick check for an article, an abstract or a speech.
If the count is higher than you expected, the cause is usually blank lines or repeated entries. Remove empty lines and Duplicate line remover clean the list. Paste the result back here to get the real number of items.
Limits and edge cases
- An empty box shows 0 for everything. A box that contains only one line break shows 2 lines, 0 words and 0 paragraphs.
- Windows (CRLF) and old Mac (CR) line endings each count as one line break, so a file saved on Windows gives the same count as one saved on Linux.
- Trailing spaces and tabs are easy to miss but still count.
a, two spaces and a tab, a line break, thenbgives 6 for Total Characters and UTF-8 Bytes, but only 2 for Characters (no spaces). - The text box accepts up to about 1,000,000 typed or pasted characters (fewer with emoji). Load from file accepts files up to 2 MB. For larger logs, a command-line tool is the better fit.
- Reading time shows at least 1 min as soon as there is a single word. It is an estimate, not a measurement.
If you need to refer to a specific line by number, the Line Numberer adds a number to each line. The article Counting Lines, Words and Characters — Why It Matters explains why different programs report different totals for the same text.