Text

Word counter: understand counts, selections and text limits

·

Type, paste or open plain text, choose its text language, then read the live word and character totals. ToolMellow also shows sentences, paragraphs, hard lines, UTF-8 bytes, phrase frequency and estimated reading and speaking time. Select a passage when you want its statistics separately.

Start by matching the count to your task. An editor’s visible characters, its input-length limit and a downloaded file’s bytes measure different things. Selection changes the analysis, while Copy text and Download keep the whole editor. Save the text you need before clearing or leaving the page.

Word & character counter

Choose the text and scope before reading the numbers

The counter starts analyzing after a short pause in editing. Try an example to explore the controls, or replace it with your own text. The text-language selector can differ from the site’s interface language, so check it before comparing results.

For a submission with a prescribed word limit, use the receiving editor or service as the final authority for that submission. A document application can count a different scope from pasted plain text. Google Docs and Microsoft Word also provide selection-based counting instructions; copying a document’s body here does not recreate its document model.

  • Type, paste or open a UTF-8 text file.
  • Choose the language of the text you want to analyze.
  • Read the totals, or select a passage for its separate statistics.
  • Expand Sentence and word lengths and inspect the phrase table if useful.
  • Set reading/speaking rates and a word goal around your own task.
  • Copy or download the whole text before clearing or navigating away.

Google Docs Help: document and selection word countsMicrosoft Support: show word count and count a selection

Word counts follow language-sensitive boundaries

The counter uses the browser’s Intl.Segmenter word boundaries for the selected text language. Word-like segments count. A segment containing only letters and combining marks also counts when it includes at least one letter, even if a browser labels that segment non-word-like. Emoji and punctuation alone do not become words through this extra rule.

Splitting only at spaces gives a different result, especially for writing systems such as Chinese. A Chinese word count is not a Han-character total. Hyphens, apostrophes, mixed-language text and browser segmentation data can also affect boundaries. Keep the same text, selection and language when comparing two counts.

MDN: Intl.Segmenter and language-sensitive text segmentationUnicode UAX #29: text segmentation and boundary conventions

Separate visible characters, UTF-16 units and UTF-8 bytes

The Characters total counts grapheme clusters, including whitespace. A base letter with a combining accent or a joined emoji family can therefore occupy one displayed character. Without spaces removes clusters made entirely of JavaScript whitespace, including more than ordinary space characters; it does not remove every invisible code point.

The input limit uses UTF-16 code units, and the byte total uses UTF-8 encoding. These are separate from grapheme counts. The examples below show why a short-looking passage can use more input units or bytes than its visible-character total suggests.

Separate visible characters, UTF-16 units and UTF-8 bytes
Text exampleGraphemes / UTF-16 unitsUTF-8 bytes
A1 / 11
é (e followed by a combining accent)1 / 23
🌿1 / 24
👨‍👩‍👧‍👦1 / 1125

MDN: Intl.Segmenter and language-sensitive text segmentationMDN: String.length and UTF-16 code unitsMDN: TextEncoder and UTF-8 bytes

Choose among eleven text languages independently of the interface

The text languages are English, Simplified Chinese, Hindi, Spanish, French, Arabic, Bengali, Portuguese, Indonesian, Urdu and German. Changing this selector changes the analysis language and the editor’s language attribute; it does not translate your text.

The selected language also controls locale-sensitive lowercase keys and the small common-word list used in phrase analysis. It does not identify the language of every passage automatically. For mixed text, choose the language that best fits the passage you are checking and treat cross-tool differences as differences in counting conventions.

MDN: Intl.Segmenter and language-sensitive text segmentation

A selected passage changes statistics while exports keep the whole text

A nonempty selection becomes the analysis input. This includes a selection containing only whitespace: selecting one space can show zero words and one character even while the editor contains a longer document. Remove the selection to return to all-text analysis.

Counts, frequency, length statistics, time estimates and goal progress follow that selected passage. Copy text and Download continue to use the whole editor. To save only an extract, copy that selection with your browser’s normal copy command or prepare the extract separately; the tool’s export buttons do not switch to selection-only output.

A selected passage changes statistics while exports keep the whole text
Control or resultWith a nonempty selectionWith no selection
Counts and length statisticsSelected passageWhole editor
Phrase frequencySelected passageWhole editor
Time estimates and goal progressSelected passageWhole editor
Copy text and DownloadWhole editorWhole editor

Sentences, paragraphs and hard lines answer different questions

Sentences use the selected language’s sentence segmentation, and a segment must contain a letter or number to enter the sentence total. Paragraphs split trimmed nonempty input at blank LF-based line groups. A visual wrap caused by a narrow editor does not add a hard line.

The Lines total recognizes LF, CRLF and CR hard breaks, and a trailing hard break adds a line. Blank lines expressed only with CR do not split paragraphs in the same way as blank LF groups. The examples use escaped line-ending notation to make the distinction visible; they describe actual hard breaks rather than the backslash characters you could type.

Sentences, paragraphs and hard lines answer different questions
Plain-text structureParagraphsHard lines
A.\n\nB. with LF breaks23
A.\r\n\r\nB. with CRLF breaks23
A.\r\rB. with CR-only breaks13
One paragraph wrapping visually without hard breaks11

Read phrase percentages with their original denominator

Choose one-, two- or three-word phrases. Candidate sequences stay within each sentence, and punctuation is not a token, so a sequence can span punctuation inside that sentence. Tokens are NFC-normalized and lowercased for the selected locale; words are not reduced to stems. Unique-word counts use those normalized tokens independently of the common-word filter.

With Text language set to English, The green leaf. The green leaf! supplies four candidate two-word sequences. With common-word exclusion enabled, the green is omitted from the displayed ranking and green leaf appears twice at 50.0%. The denominator remains four. The table shows at most twenty phrases, ordered by frequency and then locale comparison, with percentages rounded to one decimal place. These percentages describe this text, not a search-ranking score.

Use sentence and word lengths as descriptions of the current passage

Expand Sentence and word lengths to see the longest and shortest sentence by counted words, average words per sentence, average characters per sentence and average characters per word. These values follow the current selection and text language.

Only sentences with counted word tokens enter these length statistics. Sentence character lengths include internal whitespace and punctuation after trimming their edges. Word character lengths use the original token’s graphemes, before lowercase normalization. Displayed averages use at most two decimal places; the panel does not assign a reading level or assess writing quality.

Set reading and speaking rates around the way you will use the text

Reading starts at 200 words per minute and speaking at 130. Each rate accepts values from 50 through 1000. The estimate is the word count multiplied by 60 and divided by the relevant rate, rounded upward to a whole second. An out-of-range rate falls back in analysis to that estimate’s default.

At the default rates, a passage of 1200 counted words gives six minutes of reading and nine minutes fourteen seconds of speaking. A selected passage produces estimates for that passage. Choose rates from your own experience when planning a reading or talk; these calculations do not measure comprehension, language proficiency, pauses or delivery style.

Track a word goal without changing the counted text

Word goal starts at 500. You can set it from zero through 1000000; zero hides the goal panel. Progress follows the current counted words, including selection-only counts when a passage is selected.

Once the count reaches or exceeds the goal, the progress bar stays full and the remaining count stays at zero. The actual word count still shows the text’s count. The goal is a planning aid: it does not shorten, complete or otherwise edit the passage.

Find and replace literal text, then check the analysis scope

Open Find & replace in input, enter the exact text to find and choose whether to match case. A dot is a literal dot rather than a regular-expression wildcard, and replacement dollar signs remain literal text. Find next selects a match, which can also switch the counter to selection-only statistics.

Replace all works across the whole editor, even when a passage was selected. The resulting text must fit within the input cap of one million UTF-16 units. If expansion would exceed that cap, the replacement is refused and the original input stays in place. Undo is available for an accepted replacement while its snapshot remains within the history budget.

Use the bounded in-page history, and save before Clear

Undo and Redo can restore earlier edits while the page remains open. The shortcuts are Ctrl/Cmd+Z for Undo and Ctrl/Cmd+Shift+Z or Ctrl+Y for Redo. Consecutive edits can be grouped, so a history step does not necessarily correspond to one keystroke.

History retains at most twenty older snapshots and a combined budget of four million UTF-16 units across past and future snapshots; the current input is separate. Older states can be discarded as the budgets are reached. Clear removes the text and its undo/redo history. Page history is not autosave or a promise of recovery after navigation or refresh.

Check file bytes and decoded text length separately

Open text file reads one file as UTF-8 text and replaces the editor when accepted. The picker offers text files and common text-based extensions such as TXT, JSON, HTML and CSS. Markup remains literal text; the counter does not render HTML or parse a PDF or DOCX document into its original layout.

The file must be strictly smaller than 4000000 bytes, and its decoded string must contain at most 1000000 UTF-16 units. A file of 1000001 ASCII characters is only about one megabyte but already exceeds the decoded-input cap. A rejected file keeps the editor text; an accepted import can be undone while its previous state remains in the history budget.

Check file bytes and decoded text length separately
LimitAllowed sizeWhat it measures
Current inputAt most 1000000 UTF-16 unitsThe string-length cap, not a million graphemes
Imported fileStrictly below 4000000 bytesFile bytes before decoding
Decoded importAt most 1000000 UTF-16 unitsDecoded text, checked separately from file bytes
Older history20 snapshots and 4000000 UTF-16 units combinedPast/future snapshots, separate from current input

MDN: Blob.text() and UTF-8 decodingMDN: String.length and UTF-16 code units

Keep a complete paste and inspect the text you export

A paste that would exceed the input cap is refused as a whole with a limit notice, preserving the editor text. The size check subtracts the replaced selection and treats CRLF or CR pasted line endings as LF. A paste can therefore fit when it replaces selected text even if appending the same text would exceed the cap. Ordinary typing also remains subject to the editor’s native input limit.

Copy text writes the whole editor to the clipboard. If clipboard access is unavailable, the page asks you to select and copy manually. Download saves that whole editor as UTF-8 plain text in toolmellow-result.txt; it does not export the statistics, phrase table or a formatted document. Open the downloaded text when exact content matters.

MDN: maxlength and textarea input limitsMDN: TextEncoder and UTF-8 bytes

Keep local processing separate from saving and document extraction

Counting, editing and plain-text import/export process text on your device. The page and its worker/library assets can still load over the network. Local analysis does not establish an installed offline application, and no editor autosave is provided.

Analysis runs in a local worker. New edits or analysis options invalidate stale work, and Clear discards the current text and analysis. The whole job has a 60-second deadline including worker startup. If the browser cannot start the worker or a job times out, try a smaller passage or a compatible browser.

A separate reviewed-PDF-text workflow can hand text into this counter within the same tab. That handoff supplies text to inspect; it does not add direct PDF upload, OCR or document-layout counting here. For a PDF or Word source, extract or copy the intended text first, check what was included, and then choose the counter’s language and scope.

Common questions

Why do word counts differ between tools?

Check that both tools use the same text, selection and text language. Word boundaries can vary by counting rules and browser data. A document editor may also count a different document scope from the plain text copied here. Use the receiving system’s count for a prescribed submission limit.

Do emoji and combining marks count as one character?

The Characters total uses grapheme clusters, so a letter with a combining accent or a joined emoji sequence can form one displayed character. That sequence can still use several UTF-16 units and UTF-8 bytes. The million-unit input limit is separate from the visible-character total.

Does selecting text change what Copy and Download save?

The tool’s Copy text and Download buttons always use the whole editor. Selection changes counts, frequency, lengths, time and goal progress only. Use the browser’s ordinary selection-copy command when you need just the selected passage.

Which text languages can I choose?

English, Simplified Chinese, Hindi, Spanish, French, Arabic, Bengali, Portuguese, Indonesian, Urdu and German. The text language is independent of the interface language and does not translate the text.

How are one-, two- and three-word phrase percentages calculated?

Each sentence supplies candidate token sequences of the chosen length. All those sequences enter the denominator before optional common-word exclusion removes phrases from the displayed ranking. Keys use NFC normalization and locale lowercase; the table shows at most twenty rows and does not stem words.

How do reading and speaking speeds affect the estimate?

Each estimate is counted words multiplied by 60, divided by its rate and rounded upward to a whole second. Defaults are 200 reading and 130 speaking words per minute, with supported rates from 50 through 1000. These arithmetic estimates do not measure comprehension or delivery.

Why can a small text file exceed the input limit?

File bytes and decoded UTF-16 units have different caps. Import requires fewer than 4000000 file bytes and at most 1000000 decoded UTF-16 units. A 1000001-byte ASCII text file passes the byte-size check but exceeds the decoded-input cap.

Can I count PDF or Word files directly?

Open text file does not parse PDF or DOCX documents. Supply the intended plain text after extracting or copying it. A separate reviewed-PDF-text workflow can pass text into the counter in the same tab, without adding PDF layout analysis or OCR to this tool.

Is my text saved after I clear or leave the page?

The editor and bounded undo/redo history stay in page memory. Clear discards the text and its history; refreshing or leaving the page can lose the work. Copy or download the text you need before those actions. No autosave or durable recovery is provided.

What happens if I paste more than the input limit?

The paste is refused as a whole with a notice, keeping the editor’s current text. The check uses the resulting UTF-16 length after replacing any selected range and normalizing pasted CRLF/CR line endings to LF. A fitting selected replacement remains allowed.

Why are paragraphs and lines different?

Hard lines split at LF, CRLF or CR breaks, with a trailing break adding a line. Paragraphs split trimmed nonempty input at blank LF-based groups. CR-only blank groups do not split paragraphs in the same way. Visual wrapping does not create either a new hard line or a blank-line paragraph.

Why can differently written accented words share a frequency row?

Frequency keys use NFC normalization and lowercase for the selected language, so equivalent composed/decomposed accents and case variants can share a key. The editor text is not rewritten by that analysis, and word-length measurements use original graphemes.

Can I turn off the word goal?

Set Word goal to zero to hide it. A positive goal tracks the current analyzed word count, including a selected passage. Progress is capped at the goal and remaining words cannot go below zero, while the actual word total remains visible.

What is included in the downloaded file?

Download writes the whole editor as UTF-8 plain text in toolmellow-result.txt. It does not save a statistics report, phrase table or original document formatting. A selected passage does not limit that export.

Primary references

Put it into practice.

Related guides