Compress Code Before Sending to an LLM

Comments and blank lines add tokens without helping the model read your code. Put code in ``` fences and turn off “Preserve code blocks” to strip them.

AI DevRuns in your browser — nothing uploaded

≈ 0 tokens
≈ 0 tokens
0tokens before
0tokens after
0%smaller

Token counts are estimates in the style of OpenAI’s tokenizer.

How it works

  1. 1

    Removes filler

    Politeness and padding like “Could you please”, “It is important to note that” and “very” cost tokens and rarely change the answer.

  2. 2

    Shortens wordy phrases

    “In order to” becomes “to”, “due to the fact that” becomes “because”. Aggressive mode adds abbreviations like “e.g.” and “config”.

  3. 3

    Drops repeated instructions

    If the same sentence appears twice, only the first one is kept. Long system prompts often repeat themselves.

  4. 4

    Handles code carefully

    Fenced code blocks are left untouched by default. Turn off “Preserve code blocks” to strip comments and blank lines too.

Questions, answered

The default rules only remove words that carry no instruction, so answers are usually the same. Aggressive mode goes further — check the output before using it for anything important.

Popular uses