DensePack

Cuts the input token cost of frontier AI models

Paste or drop text into the Input box. DensePack packs the same text into an image below.

Input

The page reads a file as raw source. An HTML file stays HTML source. Nothing leaves your browser. The page works offline.

Settings

riskysweet spotsafewastes pixels
Details

Auto starts a new image when an image reaches 1932x1932 px. Long text then never makes an image big enough to force downscaling. You do not need to split the text by hand.

Fable 5.1, Opus 5.5 and Sonnet 5.5 all downscale an image above 2576 px on the long edge or above 4784 visual tokens. Downscaling makes an image of packed text unreliable or unreadable.


Details

Color coding makes reading much more accurate and adds no pixels or token cost.


Details

Off: each line break becomes a space. Use this for CSS, JSON, HTML and prose.

On: each line break becomes one visible character. The model can then rebuild the lines. Use this for Markdown, YAML and lists, where a line break changes the meaning.

The marker costs nothing. The page joins the lines with one character in the two cases, a space when the option is off and the marker when it is on. The character count stays the same. The only difference is glyph width. The marker is a few pixels wider than a space, and a line can wrap one character earlier.

Output

Token savings meter
— Image vs Text
—
Math
Count Method
Text tokens characters ÷ 2.40
Image tokens ceil(w÷28) × ceil(h÷28) patches, plus 2 for the image block, summed over all pages
This meter image tokens against text tokens, nothing added

Patches are the real vision tokenizer, the same for Fable 5.1, Opus 5.5 and Sonnet 5.5, as the vision docs at platform.claude.com describe. The 2 tokens per image are the content block itself. On 28 packed PNGs from 418x412 to 1144x1168, the token count was the patch count plus exactly 2 at each size.

The Claude Code plugin adds about 56 tokens and one Read call for each packed report. The extra tokens are a line that names the image files and the one Read call that opens them. You paste the image yourself, and this meter adds neither cost. The plugin's own numbers are in README.md.

Characters
0
Image size
—
Total pixels
—
Token cost · text
—
Token cost · image
—
Archive (0)