Messages JSON token breakdown

Client

Paste a chat API messages payload and get a per-message rough token table. Pair with JSON format if the file is minified.

Messages JSON

?

Expects a JSON object with a messages array (role + content). Multipart content arrays sum text parts only. Counts are heuristic—not billing-grade.

Total: ~48 tokens · 190 characters · 3 messages

#Role~TokensCharsPreview
0system1143You summarize pasted logs in three bullets.
1user11442026-01-01 ERROR timeout connecting to cache
2assistant261031. Cache connection timed out. 2. Check network and credentials. 3. Retry after

Nearby workflows on Toolcore

  • Chat turn token breakdownSplit User:/Assistant: exports and estimate rough tokens per turn—offline conversation planning, not tokenizer-exact. when you want a second pass with AI-assisted explanation on Toolcore.
  • LLM token estimateRough character-based token planning for prompts and context—CJK-aware heuristic, browser-only—not tokenizer-exact. when you want a second pass with AI-assisted explanation on Toolcore.
  • JSON formatterJSON format online: pretty-print, minify, validate, escape, download . when you want a second pass with AI-assisted explanation on Toolcore.
  • LLM API cost calculatorEstimate per-request and monthly chat spend from input/output token counts and your price per million—browser-only arithmetic, not live pricing. when you want a second pass with AI-assisted explanation on Toolcore.

Common use cases

  • Inspect which turns dominate a chat/completions request body before trimming history.
  • Validate exported conversation JSON from scripts or logs without sending it anywhere.
  • Compare system vs user share when tuning prompt templates.

Common mistakes to avoid

  • Pasting production secrets in message content

    Redact tokens and keys first—even though processing is local, exports may be saved.

  • Expecting vision or tool-call parts to be fully modeled

    Text parts are summed; exotic content shapes may need manual review.

FAQ

Which JSON shape is supported?

An object with a messages array; each item should have role and content (string or text parts array).

Does this send data to an API?

No. Parsing and counts run entirely in your browser.

Related utilities you can open in another tab—mostly client-side.