Google Docs does not ship a line counter. The built-in word count dialog (Tools > Word count or Ctrl+Shift+C) reports only the number of pages, words, characters, and characters excluding spaces, so there is no on-screen total of how many lines the document contains. To get an accurate line total, you have to copy the text out of the document and feed it to a tool that defines line boundaries explicitly. Line Counter accepts pasted text, analyzes it locally in the browser, and reports total lines, non-blank lines, blank or whitespace-only lines, and the length of the longest line measured in Unicode code points. Because the rules for what counts as a line differ across editors, command-line utilities, and word processors, the tool states them up front: an LF, a CRLF pair, and a lone CR each create one line boundary, a trailing newline always creates one final blank line, and the same pasted bytes produce the same statistics every time.

What Google Docs Offers for Counting Lines
Google Docs is built around paragraphs and pages, not numbered text lines, so the native toolset has two related features that look useful but never produce a total. The first is the word count dialog. Open it from the Tools menu, click Word count, or press Ctrl+Shift+C (Cmd+Shift+C on macOS). The popup shows Pages, Words, Characters, and Characters excluding spaces, and that is all; there is no Lines field anywhere in the box, in either the compact or expanded view. The second feature is the line numbers toggle under View > Show line numbers. When this is on, Google Docs draws a small number beside every paragraph so you can navigate by eye, but the document never stores or sums those numbers, and the toggle cannot export them or be queried by an add-on for a total.
For readers who specifically searched for a line counter, the practical consequence is that you cannot satisfy the question inside Google Docs itself. You need either an external utility that operates on the raw text or a workaround that approximates a total. A copy-and-paste approach is the simplest of these, and the rest of this guide focuses on how to do it without changing your document or installing an extension.
Workarounds Google Docs Users Commonly Try
Before reaching for a dedicated line tool, several workarounds circulate in support threads. They each have a clear limitation, summarized below.
| Method inside Google Docs | What it shows | Why it falls short |
|---|---|---|
| Tools > Word count (Ctrl+Shift+C) | Pages, words, characters | No line total is reported, even after expanding the dialog. |
| View > Show line numbers | Numeric label beside each paragraph | Visual only; the document never sums or exports the values. |
| Drag a selection from page top to bottom | Selected word and character counts in the status bar | Selection does not match logical lines and breaks on soft wraps. |
| Paste into Google Sheets and run COUNTA | Number of non-empty cells in a column | Each line must be retyped into its own cell, losing formatting and structure. |
Each of these approaches either ignores lines entirely or replaces them with something else. The only reliable answer to "how many lines is this" is to count the line breaks in the raw text, which is exactly what a paste-based line tool does.
Counting Lines Accurately With the Line Counter
For most Google Docs users, the fastest path is a copy-paste round trip. The whole process takes a few seconds and never modifies the original document.
- Open the Google Docs document you want to measure.
- Select all the text with Ctrl+A (Cmd+A on macOS).
- Copy the selection with Ctrl+C (Cmd+C on macOS).
- Open the Line Counter in a new browser tab.
- Paste into the editor with Ctrl+V (Cmd+V on macOS); no submit button is required.
- Read the four statistics: total lines, non-blank lines, blank or whitespace-only lines, and the longest line in code points.
- Use Clear to wipe the input and start a fresh measurement; statistics return to zero immediately.
The analysis runs entirely in your browser, so nothing is uploaded to a remote service, no account is required, and the original Google Doc remains untouched. The statistics update as you type or paste, which makes the tool useful for trimming blank-line runs or measuring a section before and after a rewrite. To measure only part of a document, highlight the section in Google Docs before copying so the rest of the document is excluded from the paste.
How the Tool Defines a Line Boundary
Line counting is only reproducible when the rules are stated. Line Counter defines them explicitly. An entirely empty input contains zero lines; once the input contains any character, it contains at least one line. A line feed (LF, written \n), a carriage-return plus line-feed pair (CRLF, written \r\n), and a lone carriage return (CR, written \r) each create one line boundary. CRLF is treated as a single boundary rather than two, which prevents a Windows-style line ending from being double-counted when text has been saved from multiple sources. Mixed endings are accepted in the same input, which is useful for text that has traveled between Unix, Windows, classic Mac, terminal, and clipboard environments. A newline boundary at the end of the input always creates one final blank line; this behavior follows the visible split structure and is never silently changed based on whether the last line contains text.
| Input bytes | Total lines | Non-blank lines | Blank lines |
|---|---|---|---|
| empty input | 0 | 0 | 0 |
| alpha | 1 | 1 | 0 |
| alpha followed by one LF | 2 | 1 | 1 |
| one CRLF only | 2 | 0 | 2 |
| two consecutive trailing LFs | 3 | 1 | 2 |
For a single worked example, paste the text alpha, an LF, a blank line (a second LF), the word beta, an LF, the word gamma, and a final LF. The split yields five segments: "alpha", "", "beta", "gamma", and "". That gives five total lines, three non-blank lines (alpha, beta, gamma), and two blank lines (the empty middle segment and the empty trailing segment). The longest line, alpha, beta, or gamma, measures five Unicode code points. The arithmetic in this paragraph can be reproduced directly from the rule set above: 5 total - 3 non-blank = 2 blank, and 3 + 2 = 5 total, which matches the cross-check built into the tool.
Reading Non-Blank and Longest-Line Statistics
The four statistics are designed to cross-check one another. Total always equals non-blank plus blank, which gives you a quick way to verify the result by hand. A line is counted as non-blank when trimming its Unicode whitespace leaves at least one character; a line containing only spaces, tabs, or any other whitespace that JavaScript trim recognizes is counted as blank. The original whitespace characters are not removed from the input and still contribute to the longest-line length. A line with spaces around a letter, such as " a ", counts as non-blank because the trimmed content is still the letter a.
Longest-line length uses Unicode code points rather than UTF-16 code units or visible grapheme clusters. The distinction matters whenever emoji or combining characters are present. A supplementary-plane emoji such as π occupies two UTF-16 code units but counts as one code point here. A decomposed accented letter such as the letter e followed by a combining acute accent counts as two code points even though it may render as one visible glyph. A family emoji joined with zero-width joiners contains several code points while appearing as a single symbol. Tabs count as one code point even though editors typically render them as multiple columns. Code-point length is also not terminal width, monospace cell width, bytes, or normalized text length, so the metric describes the structure of your text rather than how it will look on screen.
When the Total Differs From Another Tool
If you compare the Line Counter result against a different program and the numbers do not match, the discrepancy almost always comes from one of three places: whether a trailing empty line is counted, whether Unicode normalization is applied before counting, and how lines that contain only whitespace are classified. Google Docs treats a final paragraph as a paragraph whether or not you press Enter at the end, and it stores content in a normalized form. The Unix utility wc -l does not count a final empty line; many editors suppress it as well. Line Counter counts it on purpose, so a document whose last paragraph is blank will produce a higher total than wc -l on the same bytes. Make sure both files use the same Unicode normalization before you compare; the Line Counter does not normalize input on your behalf, by design, so the analysis describes your exact text.
Inputs over 1,000,000 UTF-16 code units are rejected in full: the tool hides the previous statistics and reports an error rather than counting a prefix. For documents that exceed that limit, paste one section at a time and add the totals, or use the related Word Counter for character and word totals. The same code-unit allowance governs what the tool can analyze, so very large Google Docs must be split into sections before they can be measured line by line. If you also need to clean blank-line runs from the same document before counting, run Remove Empty Lines first and then return to the line tool with the trimmed paste.
If you're weighing options, How to Randomize a List in Google Sheets Without Formulas covers this in detail.