Google Docs Word Count Overlay
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Adds a persistent, real-time word count overlay to Google Docs documents. The overlay sits in the corner of your screen and updates automatically as you type, showing word count, character count (with and without spaces), paragraph count, and an estimated page count. Unlike Google Docs' built-in word counter which requires opening a separate dialog, this overlay stays visible at all times, giving you instant feedback on your document's length without interrupting your workflow. You can configure exactly which metrics to display and adjust the overlay's appearance to suit your preference.
WHERE IT RUNS
Works specifically on Google Docs (docs.google.com/document/*). The script is optimized for Google Docs' unique DOM structure and contenteditable editing environment. It runs on all Google Docs documents including personal documents, shared documents, and documents within Google Workspace/Enterprise domains. The overlay appears only when you're actively viewing or editing a document.
HOW TO USE
Install the script and open a Google Docs document. The overlay appears automatically in the bottom-right corner showing word count and other selected metrics. Customize through the panel: toggle which metrics to display (words, characters with spaces, characters without spaces, paragraphs, pages), adjust the refresh rate, change font size, and set opacity. The overlay updates in real-time as you type, with no need to manually refresh. Use the "Apply Settings" button to save your changes immediately.
REAL MECHANISM: DOM TEXT EXTRACTION WITH HEURISTIC PAGINATION
This script uses a targeted extraction approach specifically designed for Google Docs' DOM architecture. It first queries for Google Docs' content containers using selectors (.kix-zoomdocumentplugin-outer, .kix-zoomdocumentplugin-inner, .kix-page, [role="textbox"]) that have been identified through analysis of Google Docs' rendering structure. The text is extracted using textContent from all matched elements, which preserves the document's text while excluding formatting elements. The word count uses a regex split on whitespace (\s+) with filtering for non-empty strings, accurately counting words even with multiple spaces or special characters. Character counts are computed using string length with and without whitespace removal using \s/g. Paragraph counting splits on newline sequences (\n+) and filters for content with length > 0. Page count is calculated using a heuristic algorithm: total words divided by an average of 275 words per page (a standard estimate used in publishing), with Math.ceil rounding to ensure at least 1 page. The extraction runs on a configurable interval (default 500ms) and is backed by a MutationObserver with 200ms debounce that triggers updates on DOM changes, ensuring minimal performance impact while maintaining real-time accuracy.
THE PANEL
Drag the panel anywhere on screen by clicking and holding the header. It snaps to screen edges when released. Collapse it to a small bubble by clicking the minimize button, and expand it back by clicking the bubble. Resize the panel from any corner. Press Escape to close the configuration panel. Your position and size preferences are saved automatically per site.
PLEASE NOTE
This script requires the free BotGentz browser extension which provides the BGPanel framework and storage APIs. Google Docs frequently updates its interface; if the script stops detecting document text, you may need to update the selectors in a future version. All data (configuration and settings) is stored locally in your browser using GM_setValue and never sent anywhere. No analytics, no tracking, no external calls. The script only reads document text visible on the page and never accesses other Google data, credentials, or your Google account information. The script does not modify your document in any way.