Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Efficient Word Count

blueheron786blueheron786535 downloads

Efficiently calculates and caches word counts for notes, with folder exclusion. Uses cache to avoid recalculating word counts for unchanged notes.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates1

This plugin efficiently calculates and caches the word counts of all Markdown files in your vault, excluding configurable folders like Templates. It updates in real-time as files change, and caches results to disk to speed up startup and vault-wide statistics.

Features

  • Automatically builds a cache of word counts for all Markdown files.
  • Excludes folders you specify (default: Templates, .trash).
  • Listens to file create/modify/delete/rename events to update cache incrementally.
  • Persists cache data on disk for fast startup.
  • Exposes a global API (window.wordCountCache) with:
    • get(path) — word count for a specific file path
    • total() — total word count across all cached files

Installation

Available via the Community Plugins browser. If you want to install it manually:

  1. Clone or download this repository.
  2. Copy the plugin folder into your Obsidian vault’s .obsidian/plugins/efficient-wordcount/.
  3. Enable the plugin via Settings > Community Plugins.
  4. Wait a few seconds on vault load for the cache to build.

Usage

You can access the word counts in your DataviewJS scripts or custom scripts via the global object:


// Get total word count in vault
const total = window.wordCountCache.total();

// Get word count for a specific file path
const count = window.wordCountCache.get("Folder/Note.md");

Exclusions

You can configure excluded files or folders via the plugin settings. For files, the .md extension is optional.

Development

The plugin is written in JavaScript. If you prefer TypeScript, you're welcome to convert it over and open a PR.

Reload plugin in Obsidian after rebuilding via CTRL + P => Reload ....

License

MIT License. Feel free to contribute!

HealthExcellent
ReviewSatisfactory
About
Calculate and cache word counts for all Markdown files in your vault, updating in real time as files are created, modified, renamed, or deleted and excluding configurable folders. Persist cache to disk for fast startup and access counts programmatically via the global API (window.wordCountCache.get(path) and .total()).
WritingFilesDevelopers
Details
Current version
1.0.0
Last updated
Last year
Created
Last year
Updates
1 release
Downloads
535
Compatible with
Obsidian 1.8.3+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
blueheron786blueheron786
github.com/blueheron786
GitHubblueheron786
  1. Community
  2. Plugins
  3. Writing
  4. Efficient Word Count

Related plugins

Claudian

Embeds Claude Code/Codex and other local Agents as AI collaborators in your vault.

Local REST API with MCP

Unlock your automation needs by interacting with your notes over a secure REST API.

ChatGPT MD

A seamless integration of ChatGPT, OpenRouter.ai and local LLMs via Ollama into your notes.

Novel word count

Display a word count, page count, creation date, or other statistics for each file, folder and vault in the File Explorer pane.

Better Word Count

Count the words of selected text in the editor.

Notebook Navigator

A better file browser and calendar inspired by Apple Notes, Bear, Evernote and Day One.

BRAT

Easily install a beta version of a plugin for testing.

Advanced URI

Control everything with URI.

Find orphaned files and broken links

Find files that are not linked anywhere and would otherwise be lost in your vault. In other words: files with no backlinks.

Git

Integrate Git version control with automatic backup and other advanced features.