AI Tools

Prompt Compressor

Trim the padding from a prompt: extra spaces and blank lines, repeated lines, long separators, and formatted JSON. Same words, fewer tokens, with exact counts.

Compress a prompt locally

Runs locally in your browser. Plain code, no AI model. Your text is not uploaded, saved, or shared.
What to remove
0 characters

Compresses as you type. Code blocks are left exactly as they are, except JSON formatting.

Compressed
Your compressed text will appear here.

Paste a prompt to compress it.

Ready when you are.

Watch: compress a prompt

No sound. Each step is captioned on screen and also written out in the guide below.

Fewer tokens in three steps

  1. 01
    Paste your prompt

    Notes, docs, logs, or a long system prompt.

  2. 02
    Check what changed

    Each rule shows how much it removed, and the tokens before and after.

  3. 03
    Copy the result

    Same words and meaning, with the padding gone.

What it removes

  • Spacing: trailing spaces, runs of spaces, and stacks of blank lines.
  • Repeats: a line pasted twice in a row.
  • Decoration: long lines of dashes or equals signs.
  • JSON formatting: indentation in JSON examples.

Words are never removed or rewritten.

Frequently asked questions

Will this change what the AI understands?

No. It only removes spacing, repeated lines, decorative separators, and JSON formatting. The words and their order stay the same.

Why are code blocks left alone?

Spacing can matter in code, for example indentation in Python or YAML. The only change inside code blocks is minifying JSON, which keeps its meaning.

How much will I save?

It depends on how much padding the text has. Copied documents, logs, and pretty-printed JSON often shrink noticeably; tidy prose barely changes. The page shows the exact numbers.

Is my text uploaded?

No. Compressing and counting tokens both run in your browser.