Conversation Turn Counter & Analyzer

Analyze a chat messages array for turns, tokens, and role balance.

Paste an OpenAI/Anthropic-style messages array and see total turns, approximate tokens per turn, user-to-assistant ratio, and flags for very long individual turns that may degrade context quality. Runs entirely in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

How are tokens estimated?

With a fast character-based heuristic of roughly four characters per token, which is close enough to spot balance and outliers. For exact billing counts, use a real tokenizer for your model.

Analyze a conversation’s structure and token balance

The Conversation Turn Counter & Analyzer takes a chat messages array and breaks down its shape: how many turns, the split between user and assistant, approximate tokens per turn, and which individual turns are unusually long. It is a quick health check before you send a transcript to a model, store it as training data, or debug unexpected context overflows.

What it measures

Paste your JSON messages array and the tool returns:

MetricWhat it tells you
Total turnsHow many messages are in the conversation
User / assistant ratioWhether the dialogue is balanced or lopsided
Total estimated tokensRough size of the whole transcript
Average tokens per turnThe typical density of each message
Flagged outlier turnsIndividual turns well above average that may crowd the window

How it works

The tool reads each message’s role and content. String content is used directly; array content (Anthropic-style content blocks) has text parts concatenated so multi-modal or tool-call messages are handled correctly. Tokens are estimated with a character-based heuristic of roughly four characters per token — fast and accurate enough to compare turns and catch outliers. It computes totals, the user/assistant ratio, the average tokens per turn, and flags any turn that sits substantially above that average.

Why these metrics matter

Role balance is a useful diagnostic. A transcript with many short assistant turns and almost no user input can signal a runaway loop or a prompt generating unrequested content. Conversely, enormous user turns with thin responses can indicate the model is not being engaged properly.

Outlier turns matter because a single enormous message can dominate the attention window and dilute the model’s sensitivity to everything else. Spotting it early lets you summarize or split that turn before the next API call.

Token estimates are not billing figures — pair this with the OpenAI or Anthropic usage parsers when you need exact counts for invoices. Use the estimates here for structural insight: is the transcript too large to fit a given context window at all?

Typical use cases

  • Checking a fine-tuning dataset for badly balanced or outlier-heavy examples before upload.
  • Debugging a support chatbot transcript to find the turn where context overflow started.
  • Auditing an evaluation dataset to ensure conversations meet a token budget.
  • Quickly sizing a retrieved conversation before injecting it into a new prompt.

Everything runs locally — nothing you paste leaves the browser.