---
collection: lessons
slug: what-is-a-token
locale: en
title: "How does AI think?"
summary: "Why does a reply from ChatGPT or Claude appear piece by piece? Because the model reads and writes in small units called Tokens, and Arabic splits into more of them."
publishedAt: 2026-10-01
status: live
tags: ["Token","Tokenizer","Model","Claude"]
canonical: https://codebelkalam.com/en/learn/what-is-a-token
---

# How does AI think?

Why does a reply from ChatGPT or Claude appear piece by piece? Because the model reads and writes in small units called Tokens, and Arabic splits into more of them.

> **Note:**
>
> The video for this lesson is in Arabic. You can [watch it on YouTube](https://www.youtube.com/watch?v=Nyn28XLgL9E).

## The short version

When you ask ChatGPT or Claude for something, the reply doesn't appear all at once; it gets written in front of you bit by bit. That isn't a visual effect to dress up the interface. The model really is writing the reply while you watch. But it doesn't write it letter by letter, or word by word the way we do.

One term is enough to understand how the model reads what you say and how it writes its reply: **Token**. You will also see why Arabic text gets split into more **Tokens** than English, and why that is no reason to switch to English.

## Key terms

- **Token**: a small unit of text (a word or part of a word) that the model processes text in. What you send counts as **Input Tokens**; what the model generates counts as **Output Tokens**.
- **Tokenizer**: a tool that shows how text is split into **Tokens** and how many there are.

## The explanation

### The keyboard that suggests the next word

When you type a message on your phone, the keyboard suggests what might come after what you have typed. You pick the suggestion, it suggests the next one, then the one after, until the sentence is complete.

The keyboard doesn't understand what you want to say. It only sees what has been typed and suggests what is likely to come next. The model works on the same logic, though it is far smarter and more complex: it picks the next piece, then the one after that, until the reply is complete.

### What is a Token?

That small piece of text is called a **Token**. The model doesn't see words or letters the way we do; it sees **Tokens**. It reads what you say in them, and it writes its reply in them.

A **Token** doesn't have to be a whole word. Sometimes a single word is split into several **Tokens**, and sometimes a short word is a single **Token**.

### Why does Arabic split into more Tokens?

These models were trained on far more English text than Arabic text. So common English words ended up with ready-made **Tokens** that cover them whole, while Arabic words get split into smaller, more numerous pieces.

The reason isn't that Arabic is harder, or that there is anything wrong with it. The model has simply seen more English.

In the video, we typed two sentences with the same meaning into a **Tokenizer**. The Arabic one is colloquial Egyptian for "AI writes the reply piece by piece". The result:

| Sentence | Characters | Tokens |
|---|---|---|
| الذكاء الاصطناعي بيكتب الرد حتة حتة | 35 | 16 |
| AI writes the reply piece by piece. | 35 | 8 |

Exactly the same amount of writing, and yet the Arabic sentence needed twice as many **Tokens**.

### The reply is written Token by Token

In the second part of the video, we asked Claude to finish an incomplete sentence with a single sentence, and slowed the video down so you can follow the reply as it appears. The model doesn't prepare the whole reply and then show it to you; it puts it out one **Token** after another, just like the keyboard suggesting the next word.

### What you send and what comes back

The **Tokens** you send to the model are called **Input Tokens**, and the ones it replies with are called **Output Tokens**. It is the same unit, once on its way to the model and once on its way back to you. You will come across these two terms a lot, because tools that charge by usage count each of them separately.

> **Warning:**
>
> The conclusion many people jump to: "If Arabic uses more **Tokens**, I'll write in English to save." If you use ChatGPT or Claude on a flat chat subscription, that difference never reaches you at all. More importantly, a clear, precise request in your own language is far more useful than a translated one that saves a few **Tokens**. Write in the language you explain your idea best in.

## Try it yourself

### 1.

Open OpenAI's **Tokenizer** at [platform.openai.com/tokenizer](https://platform.openai.com/tokenizer). In the video we used the GPT-4o-and-later setting (the `o200k_base` encoding). Pick the same setting, because the numbers differ from one setting to another.

### 2.

Paste the Arabic sentence below and look at the colours: each colour is a separate **Token**. Then look at the two counters: the number of **Tokens** and the number of characters.

```prompt
الذكاء الاصطناعي بيكتب الرد حتة حتة
```

### 3.

Clear it, paste the English sentence with the same meaning, and look at the two counters again.

```prompt
AI writes the reply piece by piece.
```

### 4.

Compare the two results. In the video, both sentences had the same number of characters (35), while the Arabic came to 16 **Tokens** and the English to only 8.

> **Tip:**
>
> If you try your own pair, make sure of two things: that both sentences carry exactly the same meaning, and that the Arabic is written without diacritics, because diacritics raise the **Token** count and spoil the comparison. If the gap comes out small, try a slightly longer sentence and it will show more clearly.

> **Note:**
>
> Every company splits text its own way, and the method can even differ between model versions from the same company. So the numbers may vary from tool to tool, but the idea stays the same: Arabic needs more **Tokens** for the same meaning.

## Why this matters to you

Since the model reads and writes in **Tokens**, they are also the unit of measurement in tools that charge by usage. In those tools, three rules hold:

- **Input Tokens** and **Output Tokens** are counted separately.
- **Output Tokens** cost more than **Input Tokens**, often several times more.
- The counting method differs from tool to tool, so a lower price per unit can mean a higher bill if the tool splits the same text into more **Tokens**.

Chat subscriptions to ChatGPT and Claude, on the other hand, are flat-rate; you don't pay per **Token**. Counting in **Tokens** starts when you move to serious coding tools like Claude Code and Codex, or when you use the models through an API. Even there, your choice of language only starts to matter for cost with long instructions sent along with every request, not with ordinary chat messages.

Because prices change, we don't list them here. Always check them at the source:

- [Claude pricing](https://www.anthropic.com/pricing)
- [OpenAI pricing](https://openai.com/api/pricing)

Images you attach to a request are also counted in **Tokens**, but differently: by the size of the image, not the number of words.

## Related lessons

- [What is AI?](/en/learn/what-is-ai): what **Model**, **LLM** and **Chatbot** mean.
