You have a saved file — a draft, a log, a list of notes, a subtitle file — and someone, or some form, wants a number: how many lines, words or characters. Counting by hand is slow and easy to get wrong, especially once blank lines and long wrapped lines get involved. The trick is knowing what each count actually means, because that is where two tools can honestly disagree. This guide explains all three in plain English, works through one small example you can check by hand, and shows the simplest ways to count a whole saved file.
The short answer: what each count means
A line is a piece of text that ends with a line break. That is the definition that matters most, and it is also the one people trip over: a line is not a row on your screen. If a long sentence wraps onto a second row because the window is narrow, it is still one line.
A word is a run of characters separated by whitespace — spaces, tabs and line breaks. Punctuation attached to a word, like the comma in “milk,” or the full stop at the end of a sentence, does not split it into two words. A number on its own, like “2026”, counts as a word by this rule.
A character is every character in the file, including spaces and, in most counters, the line breaks themselves. Two counters can therefore report different character totals for the same file simply because one includes line breaks and the other does not. Neither is lying; they measure slightly different things.
Finally, a blank line is a line with nothing on it between two line breaks. Some counters fold blank lines into the total line count and say nothing more about them. Others count them separately, which is genuinely useful: a file full of blank lines usually has a spacing problem, or empty sections left over from an edit, and a separate blank-line count makes that obvious at a glance.
A worked example you can check by hand
Take this tiny four-line file. Line 2 is blank:
Pack the blue bag.
Buy milk, eggs, and bread.
Call Ana at five.
Counted line by line, it gives:
- Lines: 4 — including the blank line.
- Blank lines: 1 — line 2 only.
- Words: 13 — 4 on line 1, 0 on line 2, 5 on line 3, 4 on line 4.
- Characters: 61 excluding the line breaks, or 65 including the four line breaks.
Check the words yourself: four plus five plus four is thirteen. The character difference — 61 versus 65 — is exactly the four line breaks. If two character counts for the same file differ by a small number, count the lines first: the gap is often the line breaks.
Blank lines: why they count, and why they are counted separately
A blank line is still a line. It occupies a line in the file, it will show up as an empty row when you open the file, and it affects the total if you are checking a length limit or cleaning up data before importing it somewhere. So a total line count of 4 for the example above is correct, even though only three lines contain words.
A separate blank-line count is genuinely useful: if a list is rejected for having too many lines, or imported rows shift out of place, it tells you immediately whether empty lines are the culprit. That is why the Text File Analyzer reports blank lines as their own figure alongside the total.

Wrapped lines are not real lines
Open a file in a narrow window and long lines wrap: one line becomes two or three rows on screen. Those rows are a display trick, not new lines. The file itself still contains one line break at the end of that line, and a proper counter will count it once.
This is the most common reason a hand count disagrees with a tool. Count rows on screen and a file with ten long lines in a narrow editor might look like twenty. Widen the window and the “extra” lines vanish. Trust the line breaks, not the rows.

The missing final newline: why two counters can differ by one
Here is a subtler trap, and it mostly bites people using the terminal. On Linux and Mac, the classic counting command is wc, and wc -l counts newline characters, not lines in the everyday sense. If the last line of a file has no newline at the end — which happens when a file is saved without a trailing line break — wc -l reports one fewer than the number of lines you see in an editor.
So a file with four lines but no final newline gives wc -l a count of 3, while an editor or a file analyzer that counts the lines themselves says 4. Both answers are defensible; they just define “line” differently. If two counts differ by exactly one, check whether the file ends with a newline before assuming either tool is broken.
The wc options are worth knowing if you ever use a terminal: wc -l counts newlines, wc -w counts words, wc -c counts bytes, and wc -m counts characters. Running wc with no options prints the newline, word and byte counts together. For everyday use, though, you do not need a terminal at all — the browser tool below is faster.
Characters vs. bytes: why accented letters and emoji split the two
For plain English text, characters and bytes match: each letter takes one byte. With accented letters, other scripts or emoji, they diverge — “é” or “😀” is one character on screen but several bytes to store.
That is why wc -c (bytes) and wc -m (characters) can disagree on the same file, and why a kilobyte figure tells you nothing reliable about character count. If a limit is expressed in characters — a caption, a form field, a bio — count characters, not bytes.
Four ways to count a saved file
1. Upload the file to a file analyzer. This is the simplest route when the text already lives in a file. Choose the file, run the count, and read the totals for the complete file, not just the part you happened to select. It also avoids clipboard limits and missed characters from copying a long file by hand. Just use each tool for its own job: a paste-in word counter is the wrong tool for a saved file, and a file analyzer is the wrong tool for a snippet you have not saved yet.
2. Use your editor’s status bar. Most editors and word processors show a live word count, and many show lines and characters for selected text. Handy for a draft you are still writing, but it counts what is on screen or selected — easy to undercount a long file if you select only part of it.
3. Use wc in a terminal. On Linux or a Mac, wc -l -w -m file.txt prints the line, word and character counts in one go, and handles huge files without opening them. Just remember the traps above: -l counts newlines, so a missing final newline costs one, and -c counts bytes, not characters.
4. Count before you import or submit. A quick count before a file goes somewhere else catches blank-line clutter, a truncated final line, or a file far longer than the limit allows — all cheaper to fix beforehand.
Count a whole file free
If you want the numbers without installing anything or opening a terminal, try the Text File Analyzer. Choose a plain-text file — a .txt, .log, .csv, .md or subtitle file, up to 5 MB — click Run, and read the line, word and character totals plus the blank-line count. It is built for whole files rather than pasted snippets, so logs, exported notes and drafts you already have saved are exactly its use case.
Two limits are worth stating plainly. First, only plain-text files are analyzed: binary files such as images, programs, archives and most office documents are rejected with an error instead of producing a misleading count from unreadable content — so this is not a way to count the words in a Word document or a PDF. Second, your file is processed in your browser and never sent to the site’s server, so nothing you analyze is uploaded or stored.
If character counts are your main concern — for example, checking text against a platform limit — the related guide to social media character limits explains how those limits work. You can also browse the File Utilities category or the full list of free tools.
Frequently asked questions
Does a blank line count as a line?
Yes. A blank line is a line with nothing on it, and it is included in the total line count. Counters that report blank lines separately still include them in the total — the separate figure is extra information, not a subtraction.
Does a wrapped line count as two lines?
No. Wrapping is a display effect. A line that wraps across two rows on screen is still one line in the file, because it has only one line break, at its end.
Why does wc -l sometimes give one fewer line than my editor?
Because wc -l counts newline characters. If the file’s last line has no trailing newline, there is one fewer newline than there are lines, and the count comes out one short.
Why do two tools give different character counts for the same file?
Usually for one of two reasons: one tool includes line breaks in the character count and the other does not, or one tool counted bytes instead of characters. Accented letters and emoji widen the byte-versus-character gap.
Can I count a Word document or PDF with a text file analyzer?
No — not with this one. It accepts plain-text files only and rejects binary files with an error rather than guessing. For a Word document, use the word processor’s own count; for a PDF, extract the text to a plain-text file first.
Counting a text file should take seconds, not a careful scroll through hundreds of lines. Know what a line, a word and a character mean, watch out for blank lines, wrapped lines and the missing final newline, and pick the counting method that matches where your text lives. For a saved file, the Text File Analyzer gives you all four numbers — lines, words, characters and blank lines — in one run, free, without uploading anything.

Pingback: How Is Reading Time Calculated? Words Per Minute Explained