Paste a large API response. Long strings and lists are cut with markers, nulls and empties are dropped, and you see tokens before and after plus an outline of the structure.
To shrink JSON for an LLM, cut the parts a model does not need to see and keep the keys, so it can still read the shape. This tool applies five rules in order of the options on the page. Strings longer than your limit are cut and end with a marker such as ... [+150 chars]. Lists longer than your limit keep their first items, or evenly spaced items if you choose Spread out, and end with a marker such as ... 97 more items. Objects and lists nested deeper than the depth limit become a one-line marker like {... 12 keys} or [... 40 items]. Null fields can be dropped, and so can empty strings, lists and objects, including ones that become empty after their own contents were dropped. Every key that survives keeps its name, so the model sees the schema even where the data is cut.
A list of 100 numbers with the limit set to 3 items becomes [1, 2, 3, "... 97 more items"]. A 200-character string with a limit of 50 becomes its first 50 characters followed by ... [+150 chars]. Characters are counted by code point, so a single emoji is never cut into broken halves, although a joined emoji sequence can be cut between its parts. The marker is real text inside the JSON: a truncated list has one extra string at its end, and a list position is never shifted by dropping a null item, because nulls and empties are only dropped from object fields, not from lists. Tell the model what the markers mean, for example in the prompt line that introduces the data.
Size is measured on the compact form of the JSON, with no spaces or line breaks, so pretty-printing in your input does not count as savings. Tokens are those characters divided by 4 and rounded up, so 404 characters is 101 tokens. That is a rule of thumb, not a tokenizer. Real counts differ by model and are higher for code, numbers and non-English text, so check with the token counter on this site or your provider before you rely on a budget. The percentage shown is the drop in characters.
The second output is an outline of the original JSON, not of the summary: each field with its type, the number of items in each list, and a question mark after a key that is missing from some objects, such as age? or email?. Types are string, integer, number, boolean, null, object and array, and a field that holds several types lists them all. For lists the outline looks at up to 2,000 items. The tool reads up to 1,000,000 characters. Numbers are read as JavaScript numbers, so an integer longer than 15 digits can lose precision, and a repeated key in an object keeps its last value. It does not summarize meaning: it cuts, it does not rewrite.
Cut long strings to a limit such as 80 characters, keep only 3 items of each list, drop null and empty fields and limit the depth to 4. The page shows the estimate before and after, and the sample drops by more than half.
That is the truncation marker. It tells the model that the list continues, and how many items were left out, so it does not assume the 3 shown are the whole list. Use Spread out to sample from the whole list instead of only its head.
Tokens are the number of characters in the compact JSON divided by 4, rounded up. 404 characters is 101 tokens. It is an estimate for planning, so check the exact count with your provider's counter.
Yes. Every key that has a value left stays under its own name, and the depth marker records how many keys or items were cut below it. A key is only removed when you ask to drop nulls or empties and its value is null or empty.
A key such as age? appears in some objects of a list but not all of them. Without a question mark the key is in every object. The outline reads up to 2,000 items per list.
No. It is processed in your browser, in this tab, and no server receives it. Your limits and switches are saved in this browser, the JSON is not.