Skip to content

+212

Morocco phone numbers

06 50 12 34 56

International +212 6 50 12 34 56, E.164 +212650123456

The numbering plan of Morocco: formats, lengths, the regular expression for each line type and the prefix blocks allocated to each carrier, as ITU publishes it. A pattern says what a number looks like and where it was allocated; whether it is in service, and who serves it today, is a different question (below).

At a glance

Country code
+212
Exit code
00
Trunk prefix
0
Mobile digits
9
Fixed-line digits
9
Number portability
yes
Carriers on record
4

How to dial a number in Morocco from anywhere: the dialling helper.

Mobile numbers start with:0607
Mobile prefix blocks by operator
Orange
30
Maroc Telecom
25
Inwi
22
Al Hourria Telecom
2

prefix blocks allocated, from the published records; a block is a prefix at the plan's allocation length

Check a number

Valid mobile number in Morocco.

+212
country code
6
network code
50123456
subscriber number
CountryMorocco numbering plan
Line typeMobile
Carrier the block was allocated toMaroc Telecom
E.164+212650123456
International+212 6 50 12 34 56
National06 50 12 34 56
RFC 3966tel:+212-6-50-12-34-56

Source: National numbering plan: Morocco (ITU)

Test a pattern

Tick the line types you accept, copy the combined pattern, and paste numbers to see which range each one falls in. Numbers are reduced to their national digits first (no spaces, no +212, no trunk prefix 0); nothing leaves your browser.

Line types to accept
^(?:(?:6(?:[0-79]\d|8[0-247-9])|7(?:[016-8]\d|2[0-8]|3[01]|5[0-5]))\d{6}|5(?:(?:18|4[0679]|5[03])\d|2(?:[0-25-79]\d|3[1-578]|4[02-46-8]|8[0235-9])|3(?:[0-47]\d|5[02-9]|6[02-8]|8[014-9]|9[3-9]))\d{5})$
NumberNational digitsMatches
06 50 12 34 56650123456Mobile
05 20 12 34 56520123456Fixed line
080-1234567801234567not in the ticked types
05 92 40 12 34592401234not in the ticked types

Need another country, or the pattern as code in your language? Open the regex builder.

Walk the prefixes

Type the first digits of a number in national form, or tap them: the operators holding blocks under those digits, then the block a full prefix falls in. 79 blocks held by 4 operators are on record.

Type the first digits of a number in national form.

In full

Cheat sheet

Country code+212
International exit code (dialling out)00
Trunk prefix (national dialling)0
Mobile number length (national digits)9
Fixed-line number length (national digits)9
E.164 example+212650123456
RFC 3966 (tel: URI)tel:+212-6-50-12-34-56
Mobile number portabilityYes

Line types and their regular expressions

Match each pattern against the national significant number: digits only, without the trunk prefix 0 and without +212. The patterns follow the national numbering plan and are anchored here.

Line typeNational digitsExample, nationalExample, E.164
Mobile906 50 12 34 56+212650123456
Fixed line905 20 12 34 56+212520123456
Toll-free9080-1234567+212801234567
VoIP905 92 40 12 34+212592401234
Premium-rate9089-1234567+212891234567

Mobile, 9 digits

^(?:(?:6(?:[0-79]\d|8[0-247-9])|7(?:[016-8]\d|2[0-8]|3[01]|5[0-5]))\d{6})$

Fixed line, 9 digits

^(?:5(?:(?:18|4[0679]|5[03])\d|2(?:[0-25-79]\d|3[1-578]|4[02-46-8]|8[0235-9])|3(?:[0-47]\d|5[02-9]|6[02-8]|8[014-9]|9[3-9]))\d{5})$

Toll-free, 9 digits

^(?:80[0-7]\d{6})$

VoIP, 9 digits

^(?:(?:592(?:4[0-2]|93)|80[89]\d\d)\d{4})$

Premium-rate, 9 digits

^(?:89\d{7})$

Carrier prefix blocks

The operator each prefix block was allocated to, in national form, from the published allocation records for +212. Numbers are portable, so this is the original allocation, not necessarily the carrier serving a number today.

OperatorLine typePrefix blocksRanges
OrangeMobile30073, 077–078, 0612, 0614, 0617, 0619–0621, 0625, 0631–0632, 0644–0645, 0649, 0656–0657, 0660, 0663–0665, 0669, 0674–0675, 0679, 0684, 0688, 0691, 0693–0694
Maroc TelecomMobile25061, 065, 067, 075–076, 0622–0624, 0628, 0636–0637, 0639, 0641–0643, 0648, 0661–0662, 0666–0668, 0682, 0689, 0696–0697
InwiMobile22060, 070–072, 0626–0627, 0629–0630, 0633–0635, 0638, 0640, 0646–0647, 0680–0681, 0687, 0690, 0695, 0698–0699
Al Hourria TelecomMobile206921–06922

Questions developers ask

How many digits does a phone number in Morocco have?
Mobile numbers have 9 national digits. Fixed line numbers have 9 national digits. That is the national number, without the country code +212 and without the trunk prefix 0.
What is the country code for Morocco?
+212. From abroad, dial your own exit code, then 212, then the national number without its trunk prefix 0. From inside Morocco, the exit code for international calls is 00.
Which prefixes are mobile numbers in Morocco?
Mobile numbers start with 06 or 07 in national form; the mobile regular expression on this page gives the exact ranges (example: 06 50 12 34 56). The carrier table shows which prefix blocks were allocated to which operator.
Can a mobile number in Morocco be ported to another carrier?
Yes. Morocco has mobile number portability, so a prefix tells you the carrier a number was originally allocated to, not necessarily the one serving it today. Only a live carrier lookup (an HLR or MNP query) answers that.