Count paragraphs in text

Paste any text and get the paragraph count. The split rule is \n\n+ (one or more blank lines), and empty pieces are dropped, so trailing blank lines do not inflate the total. The transform runs in your browser; nothing uploads. For all counts at once, see text statistics.

Input
Line 1:1 LF cloud_done Saved locally
Result Paragraph Counter
0 lines 0 chars

Paragraph counting on the blank-line rule

A paragraph is one element of the array produced by splitting the input on \n\n+ (one or more blank lines), with empty and whitespace-only pieces dropped via filter(p => p.trim()). A single line of text with no blank lines around it is one paragraph. Two paragraphs separated by a single newline are still one paragraph (the rule needs a blank line between them).

Because the tool drops empty pieces after the split, any number of consecutive blank lines collapses to a single boundary. "a\n\nb" = 2 paragraphs. "a\n\n\n\nb" = 2 paragraphs. "a\n\nb\n\n\n" = 2 paragraphs (the trailing blank piece is dropped). This matches how most word processors and markdown renderers count.

For the underlying line-split count without the blank-line rule, use line counter. For a fuller stats block (paragraphs alongside words, sentences, lines, and characters), use text statistics.

How to use count paragraphs in text

  1. 1Paste or type your text into the input panel on the left.
  2. 2The paragraph count appears in the output panel as you type.
  3. 3Click Copy in the output header to copy the count.
  4. 4Click Download to save the result as a plain-text file.
  5. 5Run text statistics alongside if you also need words and sentences.

Keyboard shortcuts

Drive TextResult without touching the mouse.

Shortcut Action
Ctrl FOpen the find & replace panel inside the input Plus
Ctrl ZUndo the last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor Plus
EscClose find & replace, or exit fullscreen
Ctrl KOpen the command palette to jump to any tool Plus
Ctrl SSave current workflow draft Plus
Ctrl PRun a saved workflow Plus

What this tool actually does

Splits on \n\n+ (one or more blank lines)

A blank line is the boundary. Single newlines inside a paragraph (soft wraps) do not create a new paragraph. Two or more consecutive newlines do.

Empty and whitespace-only pieces are dropped

After the split, each piece is checked with p.trim(). Empty strings and whitespace-only pieces are filtered out before counting, so leading or trailing blank lines do not inflate the total.

Consecutive blank lines collapse

"a\n\nb", "a\n\n\nb", and "a\n\n\n\n\nb" all report 2 paragraphs. The split regex eats every consecutive newline run, so the boundary is one boundary regardless of size.

Empty input reports 0

A zero-length input produces no non-empty pieces and the count is Paragraphs: 0. Whitespace-only input (" \n\n ") also reports 0.

Runs entirely in your browser

No upload, no logging, no server round-trip. The count fires on every keystroke.

Worked example

Three paragraphs. The single newline after here. does not start a new paragraph; the double newline after paragraph. does. The triple newline before Third still counts as one boundary.

Input
First paragraph here.
Still the first paragraph.

Second paragraph.


Third paragraph after extra blank lines.
Output
Paragraphs: 3

Settings reference

Pattern How it counts
"abc" 1 paragraph.
"abc\ndef" (single newline) 1 paragraph (soft wrap).
"abc\n\ndef" 2 paragraphs.
"abc\n\n\n\ndef" 2 paragraphs (consecutive blanks collapse).
"\n\nabc\n\n" 1 paragraph (leading and trailing blanks drop).
Empty input 0 paragraphs.

FAQ

What counts as a paragraph break?
A blank line. The split rule is \n\n+ (one or more consecutive newlines), so any number of blank lines between two text blocks acts as a single boundary.
Does a single soft-wrap newline start a new paragraph?
No. Two newlines in a row are needed. "foo\nbar" is 1 paragraph; "foo\n\nbar" is 2.
Do trailing blank lines inflate the count?
No. Empty and whitespace-only pieces are dropped after the split, so trailing blanks do not contribute.
How does this differ from line counter?
Line counter splits on \r?\n (every newline), so each soft wrap is a new line. Paragraph counter splits on \n\n+, so only blank-line boundaries count.
Is the input sent anywhere?
No. The split and count run in your browser. Nothing uploads, nothing is logged.