GUIDES / Wrong keyboard layout
Wrong keyboard layout? Fix Arabic and English gibberish
You type a message without looking, then see that «السلام عليكم» came out as hgsghl ugd;l, or that hello became «اثممخ». You do not have to retype it. This guide explains why it happens, how the Keyboard tool maps the keys back, where that mapping fails, and how to add Arabic and switch layouts on Windows, macOS, iPhone and Android.
Why your text turned into gibberish
A keyboard does not send letters. It sends the position of the key you pressed, and the operating system turns that position into a character using whatever layout is active at that moment. The key that types «ش» on the Arabic layout types a on the English one; the key for «ل» types g.
So if English is active and your fingers type «السلام عليكم» out of habit, you get the English letters that sit on the same keys: hgsghl ugd;l. It works the other way too: hello typed while Arabic is active comes out as «اثممخ».
The layout usually changes without you noticing because of:
- An accidental press of the switching shortcut, such as Win+Space on Windows or Control+Space on a Mac.
- Caps Lock on a Mac, when it is set to switch between a Latin and a non-Latin input source.
- Fast typing without looking at the screen, or a keyboard with no Arabic letters printed on the keys.
The good news: the error is in the selected layout, not in your fingers. Because we know exactly which keys you pressed, we know which characters you meant, and the text can be recovered without retyping it.
Turn Latin gibberish back into Arabic
- Open Keyboard.
- Paste the text into Original text.
- Set Mapping direction to English QWERTY → Arabic 101.
- Check the Remapped preview. The status line tells you how many key positions were mapped.
- Copy or download the result. If you picked the wrong direction, press Undo; the tool keeps up to 50 steps.
hgsghl ugd;l
السلام عليكم
Settings: Mapping direction: English QWERTY → Arabic 101 · link protection on
Open the tool: KeyboardLong sentences work the same way, because every key is mapped on its own:
hgsghl ugd;l ,vplm hggi ,fv;hji
السلام عليكم ورحمة الله وبركاته
Settings: Mapping direction: English QWERTY → Arabic 101
Open the tool: KeyboardSpaces and digits are left alone. To see what each key maps to, open Actual mapping table under the tool.
Turn Arabic gibberish back into English
The opposite happens just as often: you type an English sentence, a username or a code while the Arabic layout is active. Choose Arabic 101 → English QWERTY and paste the text:
فاثقث هس ىخ ةثثفهىل فخيشغ
there is no meeting today
Settings: Mapping direction: Arabic 101 → English QWERTY
Open the tool: KeyboardWithout the Shift layer the result is lowercase. Capital letters need Shift, and Shift on the Arabic layout types different symbols, so restore capitals yourself at the start of sentences and in names.
The Shift layer: hamza and Arabic punctuation
By default the tool maps unshifted keys only. Many Arabic characters, though, live on the Shift layer: «أ», «إ» and «آ», the vowel marks, the Arabic comma «،» and the question mark «؟». Type them with the English layout active and they come out as capital letters and Latin symbols, which stay unchanged in a default conversion:
hgsghl ugd;lK ;dt phg;?
السلام عليكمK كيف حالك?
Settings: Mapping direction: English QWERTY → Arabic 101 · Shift layer off
Open the tool: KeyboardTick Explicitly include Shift layer and those symbols are mapped using the full Arabic 101 layout:
hgsghl ugd;lK ;dt phg;?
السلام عليكم، كيف حالك؟
Settings: Mapping direction: English QWERTY → Arabic 101 · Explicitly include Shift layer
Open the tool: KeyboardHamza on alef is another common case. It sits on Shift + H:
Hkh td hglo.k
أنا في المخزن
Settings: Mapping direction: English QWERTY → Arabic 101 · Explicitly include Shift layer
Open the tool: KeyboardWhy is this not on by default? Because it also converts capital letters, brackets and quotation marks, and some of those may be intentional in your text. Turn it on when you see capitals or symbols where a hamza or punctuation should be. The tool does not try to infer Caps Lock.
Links and email addresses
A message often contains a link or an email address that was typed correctly. Protect detected links & email is on by default, so the link is kept and only the text around it changes:
hgvhf': https://example.com/offer
الرابط: https://example.com/offer
Settings: Mapping direction: English QWERTY → Arabic 101 · Protect detected links & email on
Open the tool: KeyboardWithout protection, the link is converted letter by letter and stops working:
hgvhf': https://example.com/offer
الرابط: اففحس:ظظثءشةحمثزؤخةظخببثق
Settings: Mapping direction: English QWERTY → Arabic 101 · link protection off
Open the tool: KeyboardThe tool detects links that start with https://, http:// or www., and addresses such as info@example.com. A bare domain like example.com is not detected and is converted with the rest, so fix it by hand afterwards.
Where the conversion goes wrong
- Arabic لا maps to b: on the Arabic layout the b key types «لا» in one press. You also get «لا» by pressing g then h. When converting back to English, the tool cannot tell which you did, so it always picks b.
لاخسف
bost
Settings: Mapping direction: Arabic 101 → English QWERTY
Open the tool: KeyboardSo check every b in an English result: it might have been gh.
- Mixed text: the tool converts every character you paste. If a message has one correct sentence and one garbled one, paste only the garbled part, or the correct sentence becomes gibberish. A real English comma is a good example: on the Arabic layout that key types «و».
- Other layouts: the tool assumes Windows Arabic 101 and the US QWERTY keyboard. Microsoft lists Arabic 101 as the default Arabic layout for most Arabic-speaking countries; Algeria, Morocco and Tunisia default to Arabic 102 AZERTY alongside French. With that layout, or a French keyboard, several keys sit elsewhere and the result will be wrong.
- Macs: if unexpected letters appear, choose Show Keyboard Viewer from the Input menu and compare the keys with the tool's Actual mapping table.
- Not translation, not Arabizi: the tool only puts characters back on their keys. Someone who deliberately writes mar7aba in Latin letters is writing Arabizi; for that, use Transliterate and read the Arabizi guide.
- Size: up to 100,000 text units at a time.
Add Arabic and switch layouts on your device
These steps come from the vendors' support pages. Labels can differ slightly between versions and interface languages.
Windows 11
- Go to Start > Settings > Time & language > Language & region.
- Next to Preferred languages, select Add a language, search for Arabic, then select Next and Install.
- To add another layout to an installed language, select the three dots next to it, then Language options, then Add a keyboard.
- To switch, select the input language icon on the taskbar, or hold the Windows logo key and press Spacebar.
On Windows 10 the path is Settings > Time & Language > Language, with the same shortcut.
macOS
- Choose Apple menu > System Settings, then click Keyboard in the sidebar.
- Go to Text Input, click Edit, click the + button, search for Arabic, select an input source and click Add.
- To switch, use the Input menu in the menu bar, Control+Space for the last source you used, or Control+Option+Space for the next one. You can also set the fn or Globe key to Change Input Source.
iPhone
- Open Settings > General > Keyboard > Keyboards.
- Tap Add New Keyboard and choose Arabic.
- While typing, touch and hold the globe (Switch Keyboard) key or the emoji key, then tap the keyboard you want.
Android with Gboard
- In any text field, tap the Settings icon at the top of the keyboard, then Languages, then Add keyboard.
- Choose Arabic and a layout, then tap Done. The same screen is reachable from the Settings app under System > Keyboard > On-screen keyboard > Gboard.
- To switch, touch and hold the space bar. To show a globe key instead, turn on Show language switch key under Preferences in Gboard settings.
On a phone you see the letters on screen, so the problem is rarer, but it comes back with an external keyboard connected to a phone or tablet.
Can't add Arabic? Type it in the browser
On a locked-down work computer or a public PC you may not be allowed to add a language. Use Arabic keys instead: it shows Arabic letters and vowel marks as buttons and inserts them at the cursor or over your selection. There are keys for space, new line and backspace, undo for up to 50 steps, and you can copy or download the result.
If you already know where the Arabic letters sit on the keyboard, there is another trick: type them with the English layout active, then convert the text with the Keyboard tool. It works on any machine where you cannot install the Arabic layout.
Frequently asked questions
Does the tool translate English into Arabic?
No. It maps each character back to the key that was pressed, recovering what you meant to type in the other layout. Correct English text turns into meaningless Arabic letters, not a translation.
Why are capital letters or a Latin question mark left in the result?
They were typed with Shift, and the default mapping skips the Shift layer. Tick Explicitly include Shift layer to turn them into «أ», «،», «؟» and so on.
Why did I get b where I typed gh?
On the Arabic layout, b types «لا», and so does g followed by h. The tool cannot tell them apart and picks b. Fix those words by hand.
The direction is right but the result is still wrong. Why?
The text was probably typed on a layout other than Arabic 101 or US QWERTY, for example Arabic 102 AZERTY or a French keyboard. Keys sit in different places there, so this mapping table does not apply.
How can I tell which layout is active before I type?
On Windows, the input language icon on the taskbar shows the current layout. On a Mac, the Input menu appears in the menu bar once you add a second input source. A quick glance before a long sentence saves the conversion.
Is my text sent to a server?
No. The conversion runs in your browser and nothing is uploaded. See the privacy page.
Tools used in this guide
Sources
We checked these pages when writing and updating this guide.
Microsoft Learn: Arabic (101) keyboard, KLID 00000401 ↗Microsoft Learn: Default input profiles in Windows ↗Microsoft Support: Manage the language and keyboard/input layout settings in Windows ↗Apple Support: Write in another language on Mac ↗Apple Support: Use the Keyboard Viewer on Mac ↗Apple Support: Add or change keyboards on iPhone ↗Gboard Help: Type in a different language (Android) ↗