Skip to content
MyToolkit.pro

Text analysis

Lines, words & characters counter

Understand the size and structure of any text instantly. Your text stays in this browser.

Private by design: no text is uploaded or stored.

Statistics update while you type.

Private by design: no text is uploaded or stored.

Try an example

Text statistics

Statistics update while you type.

Total Lines
0
Total Words
0
Total Characters
0
Characters (no spaces)
0
UTF-8 Bytes
0
Paragraphs
0
Reading Time
0min

How the counts work

An empty input has 0 lines. A trailing line break creates an empty final line. Windows CRLF is normalized to one line break. Characters are counted as visible Unicode grapheme clusters; bytes use UTF-8. Words are letter/number sequences and paragraphs are blocks separated by a blank line.

How to count lines in a pasted list or document

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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, then b gives 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.

Frequently asked questions

Why does the line count differ from wc -l?

wc -l counts newline characters, so a file with three lines and a final newline reports 3, and the same text without the final newline reports 2. This counter counts lines of text, including the empty line after a final line break. The same text gives 4 or 3 here.

Why are numbers counted as words?

A word here is any run of letters or digits, so "Line 1" is two words and the built-in "Three lines" example gives 6 words. "Order #1042 shipped 3 items" counts as 5 words.

Are spaces counted as characters?

Total Characters includes spaces, tabs and line breaks. Characters (no spaces) leaves out all whitespace, so you can quote whichever figure your limit uses.

When should I use the byte count instead of the character count?

Use UTF-8 Bytes when a system stores or transmits text in UTF-8 and sets its limit in bytes, such as some database column and index limits or API request size caps. If the limit is stated in characters, as on most form fields, use Total Characters.

Is my text uploaded anywhere?

No. The counts are calculated by JavaScript in your browser, and the text stays on your device.

All in Text & Lists

Word Frequency Counter

Count how often each word appears in your text. Sort by frequency or alphabetically, ignore case and strip punctuation. Works entirely in your browser.

Text & Lists In your browser

Join lines

Join multiple lines into one line with a space, comma, semicolon, pipe or no separator. Trim lines and skip blanks. Works entirely in your browser.

Text & Lists In your browser

Split text

Split text into a list by comma, semicolon, space, pipe, tab or newline. Trim each part and drop empty parts. Works entirely in your browser.

Text & Lists In your browser

Keyword density checker

Count keyword frequency and density locally with configurable stop words.

Text & Lists In your browser

Distinct values finder

Find unique values, count repetitions and see where each value first occurred. Everything runs locally.

Text & Lists In your browser

Duplicate line remover

Remove duplicate lines from any list, with optional case-insensitive and whitespace-trimmed matching. Works entirely in your browser.

Text & Lists In your browser

What do you need?

Swipe up for the next one