Codebase Tokenizer
Upload a codebase ZIP to count LLM tokens per file and in total, and find byte-identical duplicate files with SHA-256 hashing. All local, 20 MB cap.
Loading tool controlsβ¦
Verify it yourself: press F12, open the Network tab, and use this tool β your files are never uploaded.
Codebase Tokenizer at a glance
- Price
- Free
- Account
- Not required
- File uploads
- None β your files are never uploaded
- Category
- Developer Tools
Who uses Developer Tools?
Developers and engineers formatting JSON, testing regex, hashing data, encoding values or building API requests.
How to Use Codebase Tokenizer
Follow these simple steps to get instant results in your browser.
Zip the Codebase
Zip a project folder (up to 20 MB, 500 files) and upload it.
Read the Totals
See file count, total size, total tokens and duplicate groups at a glance.
Find the Waste
Open a duplicate group to see every copy, and check the per-file table for the biggest token costs.
What is Codebase Tokenizer & How Does It Work?
Codebase Tokenizer answers two questions about a codebase before you send it to an LLM: how many tokens is it, and where are the duplicates? Upload a .zip and the tool lists every file with its size and token count, totals the tokens, and groups byte-identical files by SHA-256 hash.
Token counts use js-tiktoken (cl100k_base) for text files under 1 MB β the same tokenizer setup as LLM Token Counter. Text files of 1 MB or more fall back to a ~4-chars-per-token estimate, labelled as an estimate; other files (images, fonts, archives and anything else) are listed with 0 tokens and are not estimated. Duplicates are true byte-identical files, not just same-name files; empty files are not counted.
The caps are stated on the page: 20 MB total ZIP size, 500 files. Split a larger codebase into smaller ZIPs and add the totals. Nothing is uploaded β the ZIP is read, hashed and tokenized in your browser.
Key Features & Capabilities
Per-File Token Counts
Every file listed with size and token count, sorted by tokens, with a grand total.
SHA-256 Duplicate Detection
Byte-identical files grouped by hash, with the wasted bytes totalled.
Labelled Estimates
Text files of 1 MB or more use a ~4-chars-per-token estimate, clearly labelled as an estimate. Non-text files are listed with 0 tokens and are not estimated.
Honest Caps
20 MB and 500 files, stated on the page β larger codebases split into smaller ZIPs.
Private by Design
The ZIP is read, hashed and tokenized in your browser. Nothing is uploaded.
Pro Tips
- β’Bookmark this tool for instant one-click access anytime.
- β’Drag and drop files directly onto the input surface for fastest handling.
- β’All processing happens in your browser session for maximum speed and data safety.
π― Common Use Cases
Codebase Tokenizer - Tokens and Duplicates
Text files under 1 MB are counted exactly with js-tiktoken; text files of 1 MB or more use a ~4-chars-per-token estimate, labelled as one. Non-text files are listed with 0 tokens and are not estimated. Duplicates are byte-identical files grouped by SHA-256 hash, not just same-name files.
Worked Example
- 1ZIP with 3 files: app.js (46 B, 15 tokens), utils.js (identical copy, 46 B, 15 tokens), README.md (8 B, 3 tokens)
- 2Total: 33 tokens Β· 1 duplicate group (same SHA-256) Β· 46 bytes wasted by the copy
- 333 = 15 + 15 + 3; wasted = 46 B Γ (2 copies β 1)
Sources & Further Reading
- js-tiktoken β dqbd
Frequently Asked Questions about Codebase Tokenizer
Frequently asked questions
More Developer Tools
Complementary utilities for your workflow
Codebase Tokenizer
Count LLM tokens and find duplicate files in a ZIP.