Three numbers per side, plus a delta
The count comparison gives a structural overview rather than a content diff. The split between text A and text B is a line containing exactly ---. For each side the tool computes three numbers: line count (split on \r?\n), word count (regex \S+, so any non-whitespace run is a word), and character count (the raw .length).
Output is a tab-separated table. Header row is Metric A B diff; each metric row shows A's count, B's count, and the signed difference B - A. A positive diff means B is larger; a negative diff means A is larger. Paste the result into a spreadsheet to keep the columns aligned.
Empty input on either side counts as zero lines, zero words, and zero characters. Word count uses non-whitespace runs, so punctuation attached to a word counts as part of that single token. For the actual content of the changed lines, use diff or find additions.
How to use compare line counts of two texts
- 1Paste text A into the input panel, then a line with
---, then paste text B. - 2The four-row count table appears in the output panel: header plus
Lines,Words,Chars. - 3Click Copy to copy the table; the columns are tab-separated, ready for a spreadsheet.
- 4Read the
diffcolumn for the signed changeB - Aon each metric. - 5For per-line content differences pivot to diff.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
How the counts are computed
Lines via \r?\n
Each side is split on \r?\n. Empty input counts as zero lines; otherwise the count is the number of segments produced by the split. CRLF and LF line endings both yield the same number.
Words via non-whitespace runs
Words are matched with the regex \S+, so anything between whitespace boundaries counts as one word. don't is a single word, and foo,bar is also a single word because there is no whitespace between the two halves.
Characters via raw length
Character count is the raw JavaScript .length, which is UTF-16 code units. Most Latin characters count as one each; emoji and astral codepoints count as two.
Signed diff column
The diff column shows B - A per row. Positive means B has more; negative means A has more; zero means matched.
Three-hyphen separator
The split between A and B is a line containing exactly ---. Without it the tool returns a prompt asking for two halves.
Worked example
Text B has one more line, one more word, and eight more characters than text A. To see what changed, switch to diff or find additions.
alpha bravo --- alpha bravo charlie
Metric A B diff Lines 2 3 1 Words 2 3 1 Chars 11 19 8
Settings reference
| Behaviour | Effect on output |
|---|---|
| Separator | A line containing exactly --- splits text A from text B. |
| Line counter | Splits on \r?\n; empty input is zero lines. |
| Word counter | Counts \S+ matches; whitespace is the only delimiter. |
| Char counter | Raw JavaScript .length (UTF-16 code units). |
| Diff column | Signed value B - A per metric. |
| Output format | Tab-separated, four rows including the header. |
| Empty side | Counts as zero on every metric. |
FAQ
Does the word counter use Unicode word boundaries?
\b\w+\b.Why does my emoji count as two characters?
"๐".length.