TokenPad
Format

JSON to CSV for Cheaper Prompts

Convert records to CSV and stop paying for the same keys hundreds of times.

Your input

101 characters1 lines0 tokensor drop a file

JSON to CSVExact
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
 

The repeated key problem

An array of five hundred objects with six fields repeats those six key strings five hundred times. That is three thousand key repetitions conveying six keys of information, and you pay for every one of them on every request.

CSV states each field name once, in a header row. The larger the array, the more absurd the JSON version looks by comparison — and most people never notice because the serialiser produced it automatically.

Do models read CSV reliably?

For flat tabular data, yes, provided the header row is present and immediately adjacent to the rows. Models parse delimited data without difficulty.

The failure mode is not comprehension, it is quoting. A field containing the delimiter or a newline shifts a column if it is not quoted correctly. This tool quotes properly, but test with your messiest real record rather than a clean sample before shipping the change.

When to keep JSON

Nesting, irregular records and explicit types are what JSON buys you. If records have different fields, contain nested objects, or depend on the difference between the number zero and the string "0", flattening loses information the model may need.

In that case minify the JSON instead — still typically a third cheaper than the indented form.

Frequently asked questions

How much does this typically save?
On flat tabular data with more than a handful of records, fifty to seventy percent of the tokens. The saving grows with the number of records, since the header cost is paid once regardless.
Which delimiter should I use?
Comma unless your data commonly contains commas, in which case tab avoids most quoting entirely and usually costs slightly fewer tokens as well.
Do I need to tell the model it is CSV?
A single sentence naming the format and the columns is worth its tokens. It removes any ambiguity about whether the first row is data.

More format tools