TokenPad
Format

JSON Minifier for LLM Payloads

Strip every byte of formatting from a payload before you send it.

Your input

101 characters7 lines0 tokensor drop a file

JSON MinifierExact
0Token change
Token change0no change
Input tokens0what you pasted
Output tokens0what you would send
Token cost of this result
Output tokens0
As input$0.00
× 100K requests$0.00

Everything on this page runs in your browser. Nothing you paste is transmitted, because there is no server here to transmit it to.

Result
 

How much this actually saves

Pretty-printed JSON spends two to four tokens per line on indentation alone, before any punctuation. On a nested object with a few dozen lines that is a meaningful fraction of the payload, and it recurs on every single request forever.

The typical result on real payloads is a thirty to fifty percent reduction. The counter above gives you your number rather than that range.

Where to apply it

Minify what goes to the model. Keep the readable version in your logs, your error reports and your test fixtures, where a person actually reads it. These are different audiences with different needs, and conflating them is why the expensive version ends up in the prompt.

In practice this is one line in your serialisation layer: use JSON.stringify without the indent argument on the path that builds prompts.

The larger saving underneath

Minification is the free, zero-risk win. The bigger one is usually sending fewer fields: payloads are commonly serialised straight from an internal object, carrying timestamps, internal identifiers, audit columns and nulls that no instruction ever references.

Bigger still, for tabular data, is changing format entirely — an array of five hundred objects repeats every key five hundred times.

Frequently asked questions

Is there any downside to minifying?
For machine consumption, no. The only real cost is that a human debugging a logged prompt sees one long line — which is why you keep the indented version in your logs rather than in your requests.
How much is this worth per year?
Multiply the token saving by your monthly request count and by twelve. Below a few hundred dollars, take the win and move on. Above a few thousand, it is worth also looking at field selection and format choice.

More format tools