Skip to content
JS
Package

openai-gpt-token-counter

Count the number of OpenAI tokens in a string. Supports all OpenAI Text models including GPT-5, GPT-4, GPT-3.5-turbo, and specialized models

v1.1.2, 5 Oct 2025ISCCommonJSTypes: Bundled
$ npm install openai-gpt-token-counter

Key numbers

As of 25 Sept 2026
Weekly downloads
5.4k
-28% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
1
Direct, from package.json
Last release
11 months ago
v1.1.2
GitHub stars
35
2 forks
Open issues / PRs
1 / 0
Contributors
-
Commits, last 52 weeks
2

Downloads

Last week 2026-09-15 to 2026-09-21
05k10k15k20kSept 2025Mar 2026Sept 2026High 19.9k (21 Apr 2026)Low 5.1k (5 May 2026)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

5,390 downloads last week, 32,275 in the last month. The 12-month change of -28% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
-
Latest version
1.1.2, 5 Oct 202511 months ago
First published
-
Last push to GitHub
5 Oct 2025354 days before the snapshot
Repository archived
No
Open issues
1
Open pull requests
0
Commits, last 52 weeks
2
Dependents on npm
7

Major versions

-

Recent releases

-

Module format
CommonJSFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
Not declared
Runtimes
-
Unpacked size (npm)
1.5 MB
Dependencies (1)
tiktoken
npm install openai-gpt-token-counter
  • jsDelivrhttps://cdn.jsdelivr.net/npm/openai-gpt-token-counter@1.1.2/
  • unpkghttps://unpkg.com/openai-gpt-token-counter@1.1.2/
  • esm.shhttps://esm.sh/openai-gpt-token-counter@1.1.2
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Not indexed (discovery only): downloads_week 5390 < 10000; no category.