Context Packer
Decide what survives a finite context window, and see exactly what gets dropped or compressed.
- Sample workflow
- Exportable
- Runs in this browser
Runs in your browser. Nothing you enter is sent to a server, and nothing is stored unless you save it to this device.
Total tokens available for this context window.
Optional shortcut. Sets the budget field above.
Awaiting input
No context blocks yet
Add a labeled block for each piece of context an agent would receive, mark the ones that must never be dropped, and choose a budget. Or load the sample to see a realistic agent task packed for you.
Context blocks
Pack status
Whether this pack is feasible at all, before anything else is decided.
Idle
This pack was refused
Packed order
What made it in, in final order, and why each block landed where it did.
Idle
Excluded blocks
What did not fit under the chosen strategy, and how short it was.
Idle
Suggested summarization targets
A starting point for how much a block would need to shrink to fit. A suggestion, not a rewrite.
Idle
Fixed rules this pack leans on
Every value below is stated, not hidden.
- Manual token estimates
- Taken exactly as entered from your input fixed
- Pasted content token estimate
- 1 token per 4 characters from heuristic, not a tokenizer fixed
- Value density priority weight
- Highest priority block scores N, lowest scores 1 from fixed rule fixed
- High truncation risk threshold
- Under 2% of budget left unused from fixed rule fixed
- Medium truncation risk threshold
- Under 10% of budget left unused from fixed rule fixed
Note Why not just find the optimal pack?
Packing blocks into a budget is a knapsack problem, and solving it exactly gets expensive fast as the number of blocks grows. Every strategy here is a deterministic greedy rule instead: it states what it is optimizing for, tries blocks in that order, and takes the first ones that fit. That is not the best possible pack. It is an honest, explainable one, and the reason attached to every block says exactly which rule put it there or left it out.
The one rule that is never greedy is required content. It is reserved first, unconditionally, before any strategy runs. If it does not fit, nothing gets packed at all, and the tool says so instead of quietly leaving a required block behind.
Context Packer stopped responding.
Something in this tool threw an error. Your input was not sent anywhere, and nothing was saved. Reloading the page usually clears it.