Skip to content
S/T
highneeds a human

Encoded data pasted into the prompt

Base64 and data URIs tokenize terribly — roughly one token per two or three characters.

Base64 has no word structure, so the tokenizer cannot find familiar chunks and falls back to short fragments. A rule of thumb is one token per two to three characters, against roughly one per four for English. A 100 kB base64 image in a prompt is tens of thousands of tokens.

Almost every appearance of this is accidental: an image or file got serialised into a text field somewhere in a pipeline and nobody noticed, because the prompt still worked.

If the payload is an image, send it as an image content block — providers price images by dimensions, not by encoded length, and it is usually an order of magnitude cheaper. If it is a file, send a reference and let a tool fetch it.

Before
Here is the logo: data:image/png;base64,iVBORw0KGgoAAAANSUhEUg... (14,000 tokens)
After
An image content block, or a URL the model can fetch with a tool.

Check your own prompt

The analyser checks this pattern along with the other 25, prices each finding against your request volume, and hands back a rewritten prompt. It runs in your browser — nothing is uploaded.

Run the analyser

More on structure