A chatbot conversation that has been running for an hour does not feel like a large document. It is one, though. Every message you sent and every reply the model gave is text that gets carried along as the conversation continues, and its size is measured in tokens, the unit that context limits and per-token prices are set in. When a long conversation starts to run out of room, or when the bill for a support bot climbs faster than expected, the history is the first place to measure.

This guide shows how to check the token count of a conversation history with the free Token Counter on Ovatly, which runs a real BPE tokenizer in your browser, so the transcript is never uploaded. It also explains how to read the number honestly: the counter counts raw text, and a real chat payload carries a little more than that.

Contents

  • Quick answer
  • What counts as the history
  • Why the raw count understates the payload
  • How to check a history, step by step
  • Worked example: three short messages, counted exactly
  • Limitations
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Copy the full transcript, every message from both sides, paste it into the Token Counter and click Count tokens. The result is the content size of the history in tokens, shown alongside characters, words, sentences and paragraphs. Treat it as exact for the GPT-4o family, whose o200k encoding the tokenizer uses, and as a close approximation for Claude, Gemini and other families. Then remember the one adjustment: real chat APIs add a few tokens per message for role markers and structure, so the payload a model actually receives is the raw count plus that per-message overhead.

What counts as the history

The history is the whole conversation as it would be sent again: your messages and the model's replies, in order, complete. That completeness matters. A common undercount comes from pasting only your own side of the conversation, when the model's replies are usually the longer half and are carried along just the same. If you are checking a history from a chat app, use its export or copy function to get the full transcript rather than retyping a summary of it. If you are checking logs from your own chatbot, take the messages as they are stored, including any long pasted passages inside them, because those count too.

Why the raw count understates the payload

The counter counts the raw text you paste, nothing else. A real chat API does not send bare text: it wraps each message with role markers and structure, and that wrapping costs a few tokens per message. The tool's own guidance is to treat its result as the content size, not the final API payload.

The per-message part is what makes this easy to underestimate. The overhead is charged per message, not per word, so it scales with how many messages the history contains. A history of a few long messages carries a handful of overhead tokens in total. A history of two hundred short exchanges carries two hundred lots of it, on top of exactly the same content. When you compare a raw count against a limit or a price, allow for the overhead, and allow more of it the more messages there are.

How to check a history, step by step

  1. Open the Token Counter. Copy the full transcript of the conversation, both sides, and paste it into the tool.
  2. Click Count tokens.
  3. Read the token count together with the character and word counts. That token figure is the content size of the history.
  4. If one message dominates, such as a long document pasted into the chat, count that message on its own to see its share.
  5. Use the count with the Context Window Checker or Prompt Cost Calculator if you need fill levels or prices, and remember to leave room for the per-message formatting overhead and for the reply you still want to receive.

Worked example: three short messages, counted exactly

Take a tiny three-message history built from texts whose counts are known exactly, because the tokenizer that the counter runs has counted them before.

  • A user message, "Hello, world!": 4 tokens.
  • An assistant reply, "The quick brown fox jumps over the lazy dog": 9 tokens.
  • A follow-up, "Prompt engineering is the practice of writing instructions for AI models.": 12 tokens.

Pasted together, the content totals 4 + 9 + 12 = 25 tokens, and that is the figure the counter reports for the transcript. The payload a chat API would build from the same history is 25 tokens plus the formatting overhead: three messages, each carrying a few extra tokens for its role marker and structure. On a toy history the gap is trivial. On a real one, with hundreds of messages, the same arithmetic is why the raw count should be read as the floor, not the final figure.

Limitations

The count is exact for the GPT-4o family, whose o200k encoding the tokenizer uses. Claude, Gemini and other families split text differently, so for them the count is a close approximation, not an exact figure; providers' own counters are the authority for their models. The counter counts raw text only, so it cannot show you the formatting overhead itself, only warn you that it exists. Very long pastes are counted on your own device, and a full book can take a moment; a very long transcript is subject to the same patience. On the other side of the ledger, counting happens entirely in your browser, so a private or customer conversation is measured without being sent to a counting service.

Common mistakes

  • Counting only your own messages. The model's replies are part of the history and are usually the longer half. Leave them out and the count is fiction.
  • Treating the raw count as the exact API payload. A few tokens per message ride on top for role markers and structure. Many short messages add more overhead than a few long ones.
  • Checking a summary instead of the history. If the full transcript is what gets sent, the full transcript is what must be counted.
  • Judging by word count. Tokens are sub-word pieces; frequent words are often one token, unusual words become several, and code or non-English passages cost more per word.
  • Assuming the count is exact for every model. It is exact for the GPT-4o family and approximate for other families.

FAQs

Does chat formatting add tokens? Yes, real chat APIs add a few tokens per message for role markers and structure. This tool counts the raw text only, so treat the result as the content size, not the final API payload.

Is this the exact count for Claude or Gemini? No. It is exact for the GPT-4o family encoding it uses, and an approximation for other families. Providers' own counters are the authority for their models.

Is my text uploaded for counting? No. The tokenizer runs in your browser; nothing leaves the page.

Why does the token count differ from the word count? Tokenizers split text into sub-word pieces. Frequent words tend to be single tokens, unusual words become several, and punctuation and spaces attach to neighboring tokens.

Should I count the whole history at once or message by message? Either gives the same content total: paste the whole transcript for one count, or count messages separately and add them up. Neither includes the few tokens per message that a real chat API adds for role markers and structure, so allow for that overhead on top of whichever total you use.

Conclusion

Checking a conversation history takes one paste: the whole transcript into the Token Counter, and the count you get back is the content size in tokens, exact for the GPT-4o family and a close approximation for the rest. Read it as a floor, because a real chat payload adds a few tokens per message on top. For the same measurement applied to a single document instead of a conversation, see Worked Example: Counting Tokens in a 2,000 Word Blog Draft. More guides like this one are collected in the AI and Prompt Tools guides.