The country code is the easy half. The half that trips people up is the zero at the front of every Moroccan number, because it is there inside the country and gone the moment you dial from outside it.
Understand that one rule and the rest of Morocco’s numbering falls into place.
Nine digits, one leading zero
Morocco uses a closed numbering plan, which means the number you dial is always the full number and the prefix is never left off. Every number is nine digits long, and it is written inside the country with a zero in front of those nine digits, making the familiar ten digit shape.
That zero is not part of the number. It is a trunk code, a signal to the Moroccan network that what follows is a national call. When you dial from abroad the country code does the same job, so the zero has to go.
The rule in one line: keep the country code, drop the zero.
Writing a number from abroad
The widget below does the conversion for you. Type any Moroccan number the way you would see it written locally and it shows the international form.
Two things worth noting about the result. The first is that the plus sign and the two zeros mean the same thing, so +212 612345678 and 00 212 612345678 reach the same phone. The plus form is the one to store, because it works from any country without you thinking about it.
Which numbers are what
Moroccan mobile numbers begin with 6. That has been true since March 2009, when a digit was added to the front of every number in the country: a 6 went on the mobile numbers and a 5 went on the fixed ones. Before that, mobile numbers were shorter and started differently, which is why an old contact list can look wrong.
So a number starting with 06 or 07 is a mobile, and a number starting with 05 is a fixed line. Calls to mobiles and calls to fixed lines are priced differently by the networks, which matters if you are buying a local SIM and wondering why one call cost more than another.
Fixed lines are tied to a region in the way older systems are, so a 05 number can hint at where somebody is. It is a hint and not a rule, since people move and take numbers with them, and businesses often keep a number that does not match their address.
Calls when you have only data
If you travel with a data only eSIM, you have no voice line, and that sounds like a problem until you think about how you actually make calls.
Almost every call you want to make in Morocco can go through an app. A riad, a restaurant, a tour operator and a taxi company all have a normal phone number, and apps such as WhatsApp, Signal and FaceTime will call a normal number over your data connection. The person on the other end needs a phone, not the same app as you.
The exception is incoming calls to you. A data only eSIM gives you no Moroccan number, so nobody can ring you on one. If that matters, use your own number for incoming calls by leaving your usual line on and your data on the travel eSIM, which is the arrangement running two lines at once explains.
Why the region matters for fixed lines
Fixed lines in Morocco carry a regional prefix, so a number beginning 05 tells you roughly where in the country the line sits. From abroad you dial them exactly like a mobile, and the region matters only for the network’s own tariffs and for making sense of a number that looks unfamiliar.
Inside Morocco, calling a fixed line from a mobile means dialling the whole ten digits with the zero in front. There is no shorter local form, because the country uses a closed numbering plan, which is the technical way of saying that the number is always the number.
For a visitor this matters in one situation. A business card, a menu or a sign above a shop will print a number in the local form, and a phone on a foreign line needs the international form. Converting is a matter of dropping one zero and adding +212, which is what the widget above does for you.
Numbers to save before you go
One last practical habit. Save every number in international format, with the plus, even the local ones. It costs nothing and it means a number copied from a booking email works whether you are ringing from your sofa at home or from a taxi in Marrakech.
If the phone side of the trip is still open, an eSIM for Morocco covers getting online, and what a local SIM costs is worth reading before you decide which way to go.