Paste text or code below. Counted entirely in your browser — nothing is uploaded anywhere.
Uses
gpt-tokenizer (cl100k encoding — the same tokenizer OpenAI's models use, and a close estimate for Claude and most other current models too). Context-window percentages already reserve 15% headroom for system prompt, conversation, and response — the same margin
llm-ctxpack uses when budgeting a repo pack.
Need this for a whole repo instead of pasted text?
llm-ctxpack does git-diff-aware, budget-aware repo packing with secret redaction built in:
npx llm-ctxpack . --budget 50000.