TXT Word Counter

Count the words in plain-text files, including large exports and logs. The encoding is detected automatically.

Choose files

Drop files here or choose filesSupported: TXTUp to 50 MB per file. Files are read on your device and never uploaded.

Counted in your browser — nothing is uploaded.

You can also drop a .txt, .md, .docx, .pdf or .epub file onto the text box.

Text analysis

Words
KeywordCountDensity

Start typing to see the most frequent words.

Character frequency
CharacterCountDensity

How to use it

  1. Drop one or more .txt files onto the box.
  2. Check the words, characters and reading time; the detected encoding is shown under the file name.
  3. Open a file in the editor to see lines, paragraphs and keyword density.

How we count

Files with a byte order mark are read as UTF-8 or UTF-16. Otherwise we try strict UTF-8 first.

If the file is not valid UTF-8, we fall back to the most common legacy encoding for this page's language (for example Windows-1252 for English, GB 18030 for Simplified Chinese, Shift_JIS for Japanese).

Counting then follows Microsoft Word rules; Windows (CRLF) and Unix (LF) line endings are treated the same.

Frequently asked questions

Why do I see strange characters?

The file probably uses an encoding we guessed wrong. Open it in a text editor and save it as UTF-8, then drop it here again.

Are my files uploaded?

No. Files are opened and read by JavaScript in your browser; nothing is uploaded, and the text is not sent with analytics. If you open a file's text in the editor, it is kept as a draft in this browser until you clear it.

How large can a text file be?

Up to 50 MB. Long texts are counted in a background thread, so the page stays responsive.

Are line breaks counted as characters?

No. As in Word, line breaks are not characters. The number of lines and paragraphs is shown in the statistics when you open the file in the editor.

Can I count CSV or log files?

Yes, any plain-text file works. Note that every value separated by spaces counts as a word.

Which encodings are supported?

UTF-8 and UTF-16 everywhere, plus one legacy encoding chosen by the page language: Windows-1252 on English pages, GB 18030 on Simplified Chinese, Big5 on Traditional Chinese, Shift_JIS on Japanese and EUC-KR on Korean pages, for example.