Morocco Phone Number Format
Country code +212 · ISO MA
How to format, dial, and validate Morocco phone numbers, with live examples.
Country Code
+212
National Prefix
0
International Prefix
00
Mobile Portability
Yes
Try it now
Pre-filled with a valid fixed line number for Morocco. Edit it and click "Try It" to see the parsed result.
Number Types & Example Formats
Each Morocco phone-number type supported by libphonenumber, with a real example formatted three ways.
| Type | Length | National | International | E.164 |
|---|---|---|---|---|
| Fixed Line | 9 digits | 05 20 12 34 56 | +212 5 20 12 34 56 | +212520123456 |
| Mobile | 9 digits | 06 50 12 34 56 | +212 6 50 12 34 56 | +212650123456 |
| Premium Rate | 9 digits | 089-1234567 | +212 89-1234567 | +212891234567 |
| Toll Free | 9 digits | 080-1234567 | +212 80-1234567 | +212801234567 |
| VoIP | 9 digits | 05 92 40 12 34 | +212 5 92 40 12 34 | +212592401234 |
How to Dial Morocco Numbers
From abroad
Dial +212 followed by the national number, dropping any leading 0.
Within Morocco
Dial 0 before the local number to make a domestic call.
Dialing out of Morocco
Dial 00 followed by the destination country code and number.
Area Codes
Browse Morocco area codes with cities, timezones, and example numbers for each.
Validate a Morocco Number with the API
Send the number to the free libphonenumber API to get the parsed country, type, formatting, and validity.
curl https://libphonenumberapi.com/api/phone-numbers/+212520123456
Frequently Asked Questions
What is the country code for Morocco?
└ The international country code for Morocco is +212. Use this prefix when dialing Morocco numbers from another country.
How long is a Morocco phone number?
└ Morocco phone numbers are typically 9 digits, not including the +212 country code.
How do I dial a Morocco phone number from abroad?
└ From abroad, dial +212 followed by the national number, dropping any leading 0. Within Morocco, dial 0 before the local number.
How do I validate a Morocco phone number programmatically?
└ Send a GET request to https://libphonenumberapi.com/api/phone-numbers/<number>. The free libphonenumber API returns the parsed country, format, type, and validity for any number — no API key required.
Other Countries with Dialing Code +212
These countries share the same international dialing prefix as Morocco.