---
title: "Arabizi (Franco-Arabic) with LLMs - detect and convert"
description: "Arabizi writes Arabic in Latin letters with digits like 3 for ع and 7 for ح. How to detect it, convert it to Arabic script with an LLM, and reply the right way."
url: https://broadrouter.com/blog/arabizi-llm-handling/
lang: en
updated: 2026-11-14
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# Arabizi and LLMs: handling Franco-Arabic with numbers like 3 and 7

By the BroadNet Inference team · 5 min read · Published 2026-11-14 · Updated 2026-11-16

Arabizi, also called Franco-Arabic, is Arabic written in Latin letters with digits for sounds Latin lacks: 3 for ع, 7 for ح, 2 for ء, 5 for خ. LLMs usually understand it but convert it inconsistently. Detect it, ask the model to transliterate into Arabic script with the dialect named, then process the Arabic text.

## Key takeaways

-   Common digits: 2 = ء, 3 = ع, 5 = خ, 6 = ط, 7 = ح, 8 = غ or ق, 9 = ص. Usage varies by country.
-   Arabizi is almost always dialect, not MSA, so tell the model which dialect to expect.
-   Convert to Arabic script before search, analytics or routing; keep the original for audit.
-   Decide reply script per product: Arabic script, Arabizi or English. Do not mirror Arabizi by default.
-   Arabizi is a typed-text problem. Latin-letter output from speech to text usually means the request lacked language=ar.

**On this page**

1.  Which numbers stand for which Arabic letters?
2.  Why is Arabizi hard for software?
3.  How well do LLMs handle Arabizi?
4.  How do you convert Arabizi to Arabic script with an LLM?
5.  Which script should the reply use?
6.  Which model should you use for Arabizi?
7.  Where does Arabizi show up?

[Arabizi](https://broadrouter.com/glossary/arabizi/), also called Franco-Arabic or “Franco”, is Arabic written in Latin letters with digits for sounds Latin lacks, such as 3 for ع and 7 for ح. To handle it with an LLM, detect it, have the model convert it to Arabic script with the dialect named, and run the rest of your pipeline on the Arabic text.

“ana 3ayez a7gez ma3ad bokra” is a normal customer message in Egypt: “أنا عايز أحجز ميعاد بكرة” (I want to book an appointment tomorrow). It grew up on phones and computers without Arabic keyboards and still appears in chat.

## Which numbers stand for which Arabic letters?

There is no standard, but digits are used for Arabic letters that look similar to them or have no Latin equivalent. The [Arabic chat alphabet](https://en.wikipedia.org/wiki/Arabic_chat_alphabet) overview lists the common conventions:

| Digit | Arabic letter | Example | Arabic script | Meaning |
| --- | --- | --- | --- | --- |
| 2 | ء (hamza) / أ | so2al | سؤال | question |
| 3 | ع | 3arabi | عربي | Arabic |
| 3’ or 8 | غ | 8aly / 3’aly | غالي | expensive |
| 5 or kh | خ | 5alas | خلاص | done / enough |
| 6 | ط | 6ayeb | طيب | OK (Gulf) |
| 7 | ح | 7abibi | حبيبي | my dear |
| 9 | ص | 9ba7 | صباح | morning (Gulf) |
| 8 | ق (in some regions) | 8alb | قلب | heart |

Regional habits differ. The overview notes, for example, that 8 for غ is used only in Lebanon, while 8 and 9 for ق are common in Saudi Arabia; in Egyptian Arabizi, 2 can stand for ق where it is pronounced as a glottal stop. Vowels are written by ear, so “ma3lesh”, “ma3lsh” and “m3lsh” (معلش, never mind) are all the same word.

## Why is Arabizi hard for software?

-   **It is almost always dialect.** People write Arabizi the way they speak, so it carries all the dialect challenges at once, with no Arabic script to anchor them.
-   **It looks like English or French.** “bas” is بس (but / only) in Arabic and nothing in English; “men” is من (from / who). Keyword detectors and language-ID tools often label Arabizi as English or another Latin-script language.
-   **No standard spelling.** Exact-match search, intent rules and analytics break.
-   **[Code-switching](https://broadrouter.com/glossary/code-switching/).** “el order bta3i lessa ma waslsh, can u check?” mixes Egyptian Arabizi and English in one sentence.

Rule-based converters struggle because one Latin string can map to many Arabic spellings; research systems such as [Darwish’s Arabizi detection and conversion work](https://arxiv.org/abs/1306.6755) combined transliteration mining with language modelling to pick the right word, and reported 88.7% conversion accuracy. Modern LLMs effectively do that in one step.

## How well do LLMs handle Arabizi?

Large models have seen Arabizi in web and social-media text, so they often understand common phrases. Results vary by model and dialect, so test before you rely on it. Typical failure modes:

1.  **Treating it as English** and replying to a misread message.
2.  **Converting into the wrong dialect,** for example “turning” Egyptian into MSA words that change the tone, or guessing Gulf where the user is Lebanese.
3.  **Inconsistent output script,** replying in Arabizi to one message and Arabic script to the next.
4.  **Hallucinated precision** on names and places, where the Latin spelling is ambiguous.

The fix is the same as for dialects generally: tell the model what to expect and what to produce.

## How do you convert Arabizi to Arabic script with an LLM?

Convert Arabizi to Arabic script first, then run the rest of your pipeline (search, routing, replies) on Arabic text. This keeps one code path and makes search and analytics work.

```python
import json, os
from openai import OpenAI

client = OpenAI(base_url="https://inference.broadnet.ai/v1", api_key=os.environ["BROADNET_API_KEY"])

NORMALISE = """You receive a customer message that may be in Arabic script, English,
or Arabizi (Arabic written in Latin letters and digits, e.g. 3=ع, 7=ح, 2=ء, 5=خ).
Customers are mostly Egyptian. Return JSON only:
{"script": "arabic" | "arabizi" | "latin_english" | "mixed",
 "dialect": "egyptian" | "gulf" | "levantine" | "msa" | "other" | null,
 "arabic_text": "<the message in Arabic script, keeping the dialect words; keep English words in Latin letters>",
 "english_gloss": "<short English meaning>"}"""

def normalise(message: str) -> dict:
    r = client.chat.completions.create(
        model="broadnet/qwen3.8-27b",
        max_tokens=1500,  # the model reasons first; leave room for the JSON
        messages=[{"role": "system", "content": NORMALISE},
                  {"role": "user", "content": message}],
    )
    text = r.choices[0].message.content.strip()
    text = text.removeprefix("```json").removeprefix("```").removesuffix("```")
    return json.loads(text)  # validate the fields before you trust them

print(normalise("el order bta3i lessa ma waslsh, can u check?"))
```

A good result:

```json
{"script": "mixed", "dialect": "egyptian",
 "arabic_text": "الأوردر بتاعي لسه ما وصلش، can u check?",
 "english_gloss": "My order still hasn't arrived, can you check?"}
```

Notes on this design:

-   **Keep dialect words.** Asking for “the message in Arabic script, keeping the dialect words” avoids silently rewriting it into MSA, which would lose meaning for routing and sentiment.
-   **Keep the original.** Store the raw message next to the conversion for audits and for retraining rules.
-   **Use a cheap pre-filter.** A simple check (Latin letters plus the digits 2, 3, 5, 6, 7, 8 or 9 inside words, as in the regex below) catches most Arabizi before you spend an LLM call. Pure-Arabic or pure-English messages can skip the conversion. For stricter output, use [structured output](https://broadrouter.com/glossary/structured-output/) with a schema.

```python
import re
ARABIZI_HINT = re.compile(r"\b[a-z]*[2356789][a-z]+\b|\b[a-z]+[2356789][a-z]*\b", re.I)
def maybe_arabizi(text: str) -> bool:
    return bool(ARABIZI_HINT.search(text)) and not re.search(r"[؀-ۿ]", text)
```

The hint misses Arabizi without digits (“ana mesh fahem”, I don’t understand) and fires on product codes like “a7x”; treat it as a cost saver, not a classifier. The LLM’s `script` field is the real decision.

## Which script should the reply use?

Decide per product, not per message:

| Reply in | When |
| --- | --- |
| Arabic script (MSA or light dialect) | Default for most businesses; readable by everyone |
| English | If your support language is English, or the customer mixed in mostly English |
| Arabizi | Youth brands that want to match the customer’s style; review samples with native speakers |

Mirroring Arabizi automatically tends to produce spellings that look odd to native users, because there is no standard to follow. If you do mirror it, give the model examples of your preferred spellings. More on setting register and script in [Arabic prompt engineering](https://broadrouter.com/blog/arabic-prompt-engineering/).

## Which model should you use for Arabizi?

Collect 50 to 100 real Arabizi messages from your channels, write the correct Arabic-script version and intent for each, and score candidate models on intent accuracy first and conversion quality second. BroadNet reports that [Qwen3.8 27B](https://broadrouter.com/models/qwen3.8-27b/) understood Gulf and Egyptian dialects and wrote fluent Arabic in its tests; it did not publish an Arabizi-specific result, so test it on yours. [DeepSeek V4.1 Flash](https://broadrouter.com/models/deepseek-v4.1-flash/) is cheaper per output token, and [BroadNet Gemma 4 VL 26B](https://broadrouter.com/models/gemma-4-vl-26b/) is the cheapest BroadNet model for a high-volume pre-classification step. Prices are on the [pricing page](https://broadrouter.com/pricing/). Latin-script Arabizi and Arabic script tokenise differently, so paste both versions of a few messages into the free [token counter](https://broadrouter.com/tools/token-counter/) before you estimate cost.

## Where does Arabizi show up?

-   **WhatsApp and social DMs:** the main source. See [Arabic WhatsApp chatbot architecture](https://broadrouter.com/blog/arabic-whatsapp-chatbot-architecture/).
-   **Search boxes:** users type “7agz” (حجز, booking). Normalise queries with the same step before [Arabic RAG retrieval](https://broadrouter.com/blog/arabic-rag-search/).
-   **Not from speech to text, if you send the language.** Arabizi is typed by people. If a transcript of Arabic audio comes back in Latin letters, the request is probably missing `language=ar`; BroadNet’s docs warn that Arabic can otherwise be transliterated. See the [WhatsApp voice-note guide](https://broadrouter.com/guides/transcribe-whatsapp-voice-notes/).

Free tools for this

-   [Arabic token counter](https://broadrouter.com/tools/arabic-token-counter/) Arabic vs English token counts per tokenizer: the "Arabic tax" in tokens and money.
-   [Arabic text normalizer](https://broadrouter.com/tools/arabic-text-normalizer/) Tashkeel, tatweel, alef, ya, ta marbuta, digits and invisible characters, with a matching Python function.
-   [Speech-to-text cost calculator](https://broadrouter.com/tools/speech-to-text-cost-calculator/) Hours, calls or voice notes to a monthly transcription bill, against your current provider.

[All free tools](https://broadrouter.com/tools/)

## Terms in this article

[Arabizi](https://broadrouter.com/glossary/arabizi/)

Arabizi is Arabic written informally in Latin letters, using digits for Arabic sounds with no Latin equivalent, such as 3 for ع. It is common in chat and social media, is mostly dialectal, has no standard spelling, and is often mixed with English or French.

[Code-switching](https://broadrouter.com/glossary/code-switching/)

Code-switching is the use of two or more languages, or varieties of one language, within the same conversation or sentence, in speech or writing. Examples include Arabic speakers mixing English words into dialect, or moving between Modern Standard Arabic and their dialect.

[Hamza](https://broadrouter.com/glossary/hamza/)

Hamza (ء) is the Arabic letter for the glottal stop. It is written on its own or on a seat: alef (أ إ), waw (ؤ) or yeh (ئ), and آ combines alef with madda. Because typed text is inconsistent about it, search engines and speech scoring often fold the alef forms into ا.

[Tool calling](https://broadrouter.com/glossary/tool-calling/)

Tool calling, also called function calling, is an LLM API feature in which the model returns a structured request to run a function the developer has defined, with JSON arguments. The application runs the function and sends the result back; the model never runs code itself.

## Questions

### Is Arabizi the same as Franco-Arabic?

Yes. Arabizi, Franco-Arabic, Franco and the Arabic chat alphabet all name the same practice of writing Arabic in Latin letters and digits. Names vary by country; "Franco" is common in Egypt.

### Should my chatbot reply in Arabizi?

Usually not. Reply in Arabic script or English, matching your brand. Some youth-focused brands do reply in Arabizi, but have native speakers check that the spelling looks natural.

### Can a regex convert Arabizi to Arabic?

Not reliably. Vowels are dropped or added freely and the same Latin letters map to different Arabic letters by context. Rules help with detection; conversion needs a language model.

### What does 3 mean in Arabic texting?

In Arabizi, 3 stands for the letter ع (ayn), as in "3arabi" for عربي (Arabic). Other common digits are 2 for ء, 5 for خ, 7 for ح and 9 for ص.

### Why did my transcription come back in Latin letters?

That is transliteration by the speech model, not Arabizi typed by users. Send language=ar with every Arabic transcription request to get Arabic script.

## Keep reading

-   [Arabic text classification with an LLM: sentiment, intent, triage](https://broadrouter.com/blog/arabic-text-classification-llm/)
-   [Gulf, Egyptian and Levantine Arabic: how LLMs handle dialects](https://broadrouter.com/blog/arabic-llm-gulf-egyptian-dialects/)
-   [Arabic prompt engineering: register, RTL, numerals and mixed text](https://broadrouter.com/blog/arabic-prompt-engineering/)
-   [Arabic WhatsApp chatbot architecture: voice notes to replies](https://broadrouter.com/blog/arabic-whatsapp-chatbot-architecture/)
-   [Arabic RAG: normalisation, chunking and retrieval that works](https://broadrouter.com/blog/arabic-rag-search/)
-   [Add diacritics to Arabic text with an LLM: prompt, checks, DER](https://broadrouter.com/blog/arabic-diacritization-llm/)
-   [Arabic grammar and spelling correction with an LLM: a how-to](https://broadrouter.com/blog/arabic-grammar-spelling-correction-llm/)
-   [Guide: Use the OpenAI Python SDK with BroadNet Inference](https://broadrouter.com/guides/openai-python-sdk/)
-   [Guide: Transcribe WhatsApp voice notes to text with an API](https://broadrouter.com/guides/transcribe-whatsapp-voice-notes/)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-arabizi-llm-handling&utm_content=page-cta) ·

**Sources**

-   [Arabic chat alphabet, overview of Arabizi conventions (fetched 2026-11-14)](https://en.wikipedia.org/wiki/Arabic_chat_alphabet)
-   [Darwish, Arabizi Detection and Conversion to Arabic (arXiv 1306.6755; fetched 2026-11-14)](https://arxiv.org/abs/1306.6755)
-   [BroadNet Inference pricing page, Qwen3.8 27B "Tested in Arabic" note (fetched 2026-11-14)](https://inference.broadnet.ai/pricing?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-arabizi-llm-handling&utm_content=sources)
-   [BroadNet Inference API reference, language parameter for transcription (fetched 2026-11-14)](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-arabizi-llm-handling&utm_content=sources)
