Lab

Render text as PNG to save LLM tokens

Paste markdown (or any text). You get a packed black-on-white PNG back — 5×8 cells, original newlines marked with ↵ so they do not leave empty rows. Vision models bill by image tiles, not by the tokenizer, so a page of tool output or a system prompt often costs fewer tokens than the same bytes as text. The canvas shrinks to the glyphs; the big cuts show up on long, dense blocks.

I wrote a take on why this is clever and dumb at the same time.

The proxy that popularised this is pxpipe. This page is just the renderer, so you can try the trick without installing one.

Preview

The PNG will show up here.

Limits: 28080 characters, 1568×728 px max, 15 / 10 min per IP. Nothing is stored.

The honest part

This is a pricing hack, not a better medium. The model reconstructs intent from a bitmap. Short instructions are usually fine. Nested API schemas, 12-character hex IDs, and anything you need byte-exact should stay text. Anthropic can close the loophole. The page is packed the same way as pxpipe's Claude profile: 5×8 Spleen cells, 312 columns, original newlines marked with ↵ so they do not leave empty rows. pxpipe is still the proxy — this page is only the renderer.

API

POST markdown or JSON. The response is the PNG, with token estimates in the headers.

curl -sS -X POST https://ninokroesen.com/api/render-text-as-png \
  -H 'Content-Type: text/markdown' \
  --data-binary @notes.md \
  -o notes.png \
  -D -

JSON body

curl -sS -X POST https://ninokroesen.com/api/render-text-as-png \
  -H 'Content-Type: application/json' \
  -d '{"text":"# hello"}' \
  -o hello.png