New · AI

AI Repo & Multi-File Token Calculator

Select or drop multiple code and text files to calculate exact token counts, check context window fit for GPT-4o, Claude 3.5, and Gemini 2.5, and copy a consolidated Markdown prompt for AI assistants.

Tokenizer:

Drag & drop code or text files here, or

Supports .ts, .js, .py, .json, .md, .txt, .go, .rs, .yaml, and more. Files stay 100% local.

or add text / file snippet manually

Exact token counts powered by OpenAI's BPE tokenizers. Your files stay local in browser memory. Estimate spend with the token cost calculator or compare specs on the LLM comparison chart.

About AI Repo & Multi-File Token Calculator

When passing code or multi-file documentation to LLMs like ChatGPT, Claude, or Cursor, it's vital to know if your files fit within the model's context window and what the request will cost. This tool lets you drop multiple files, calculates exact token counts per file using OpenAI's BPE tokenizer, displays context headroom across major models, and exports a clean Markdown prompt ready for AI.

Frequently asked questions

Are my files uploaded anywhere?+

No. Everything runs entirely in your browser using the HTML5 FileReader API and local tokenization modules. Your code and files never leave your device.

Which file formats are supported?+

All plain text, source code, JSON, YAML, Markdown, XML, and config files (.ts, .js, .py, .java, .go, .rs, .md, .txt, .json, etc.) are parsed client-side.

How does context window checking work?+

The calculator compares your total bundled token count against maximum input limits (e.g. 128k for GPT-4o, 200k for Claude 3.5 Sonnet, 1M for Gemini 2.5) and warns you if your codebase exceeds a model's limit.

Related tools