Prompt Compression Preview
Applies six deterministic compression rules to a prompt and lists exactly what each one removed, with the estimated tokens and monthly cost saved.
Nothing is uploaded. Your prompt is read with FileReader inside this tab and never leaves it — there is no server call on this page, and the text is kept out of the URL as well, so the link you share carries your settings and not your content.
Down 54 from 164 — 32.9% smaller. At 100,000 requests a month that is $16.20 of input.
- Characters before / after
- 627 → 403
- Lines before / after
- 21 → 18
- Estimated tokens before
- 164
- Estimated tokens after
- 110
- Rules that fired
- 9
- Monthly input cost before
- $49.20
- Monthly input cost after
- $33.00
Estimated, not tokenized. Token figures here come from an approximation running in your browser: no tokenizer vocabulary is downloaded, because a real one is megabytes and nothing on this page fetches anything. It imitates how a byte-level BPE splits text — words, digit groups, punctuation runs, whitespace runs — but it has no merge table, so treat it as a planning number. The authoritative count is the usage object on a real API response.
Exactly what was dropped
| Rule | Times | Est. tokens | What it hit |
|---|---|---|---|
| in order to → to | 2 | 4 | "In order to", "In order to" |
| due to the fact that → because | 1 | 3 | "Due to the fact that" |
| it is important that → (cut) | 1 | 7 | "It is important to note that" |
| please note that → (cut) | 1 | 3 | "Please note that" |
| as mentioned above → (cut) | 1 | 7 | "As previously mentioned above," |
| make sure to → always | 1 | 5 | "you should always make sure to" |
| Duplicate lines dropped | 1 | 21 | "- to answer a question about an invoice, you must first check the account status." |
| Runs of spaces collapsed | 2 | 4 | — |
| Repeated blank lines collapsed | 1 | 0 | — |
The compressed prompt
# Support Assistant ## Role you are a support assistant for a billing product. always answer in **British English**. ## Rules - to answer a question about an invoice, you must first check the account status. - because refunds are irreversible, never promise one. - do not speculate about future pricing. ## Tone Be concise. Be concrete. Never apologise twice. Answer with at most three sentences.
Prompt compression has two halves and only one of them is safe. The safe half is removing characters that carry no instruction: double spaces, trailing whitespace, blank-line pile-ups, a rule pasted in twice. That is what the default settings do, and there is no argument against it — nothing was said, so nothing can be lost.
The unsafe half is removing words. "In order to" really does mean "to", and "it is important to note that" really is noise, but the model was tuned on text where those phrases carry emphasis, and a prompt is a program you cannot unit-test by reading it. Every substitution this tool makes is listed above with the exact string it replaced, because the only responsible way to use a compressor is to read what it did.
There is a second cost that never shows up in a token count, and it is the one that catches people: compressing a prompt changes its prefix, and a changed prefix is a cold cache. If you send a 900-token system prompt on every request and it is being cached, shaving 120 tokens off it saves you 120 tokens per request at the cached rate, not the full one — while forcing one full-price write to refill the cache. On a high-traffic endpoint that is still a win within minutes, but it means the honest comparison is against the cached price, not the headline price.
The number worth chasing is not the percentage. It is the monthly figure above, because a 30% saving on a prompt sent twice a day is nothing and a 6% saving on one sent two million times is a salary. Set the request volume to what you actually run before deciding this was worth an afternoon.