created by Affan :)
Existing word counting solutions are poorly suited to LaTeX documents. General-purpose counters process raw source as plain text, producing inflated totals that include commands, preamble declarations, and environment syntax. TeXcount and Overleaf's built-in counter offer greater accuracy but present their own limitations: Overleaf's default "Total Words" counts only body text as interpreted by TeXcount, systematically excluding bibliography entries, citations, captions, and footnotes. TeXcount itself can be configured to include these elements, but doing so requires modifying command-line flags or compilation settings — a process that introduces friction disproportionate to the task of checking a document against a word limit.
This tool was developed to provide a purpose-built alternative. It performs single-pass parsing of LaTeX source entirely within the browser, requiring no server, no compilation step, and no external dependencies. The parser identifies and classifies the full structure of a .tex file: preamble content, sectioning commands, citation keys, figure captions, table environments, footnotes, mathematical expressions, and bibliography entries. Each element is assigned a typed token, and the word count is computed from whichever categories the user has toggled on. A colour-coded verbose view offers full transparency over every classification decision.
A plain text mode is also available for counting essays and other documents not written in LaTeX. In plain text mode every word is counted without LaTeX parsing, and the structure tab shows word counts per paragraph.
Affan · Land Economy Tripos · University of Cambridge
All word counting happens entirely within the browser. No LaTeX source is transmitted, uploaded, or stored on any server at any point. The tool runs as a self-contained HTML file, so document content never leaves the machine it is opened on.
The site uses Umami for anonymous, cookie-free analytics. Umami collects only aggregate usage data such as page views and visitor counts — it does not track individual users, does not use cookies, and does not collect any personal information or document content.
The entire source code is visible and open-source (MIT License). Any preferences you set (such as dark mode or toggle states) are stored only in your browser's local storage and are never transmitted.
Paste your entire .tex file into the text area — preamble, \begin{document}, bibliography and all. The counter automatically strips the preamble and parses the rest. Press Count Words or Ctrl+Enter.
By default the tool is in LaTeX mode, where commands, environments, and % comments are parsed and classified. This is what you want for .tex source files.
If you are counting a plain essay or any document not written as LaTeX source — for example, a Word document pasted as plain text — use the Change to plain text toggle beside the input area. In plain text mode every word is counted without any LaTeX interpretation: % signs, backslashes, and curly braces are treated as ordinary characters. Switch back with Change to LaTeX source.
If your assignment has a word limit, enter it in the Word Limit field. A progress bar will show your count, percentage, and signed difference. The bar turns red if you exceed the limit.
\cite-family command counts as 1 word per citation key.\begin{figure}...\end{figure} environments.table, tabular, tabularx, and longtable environments.\footnote{} commands.\section{}, \subsection{}, and \subsubsection{} commands.\begin{abstract}...\end{abstract} environments.\begin{thebibliography}...\end{thebibliography}.If you encounter unexpected behaviour, an incorrect word count, or a parsing error, please report it so it can be fixed.
Issue tracker: github.com/dziyaulaffan/latexwordcounter/issues
When reporting, it helps to include the LaTeX source (or a minimal example) that produces the incorrect result, the expected word count, and which toggles were active.