Home الرمز البريدي Morocco

Morocco الرمز البريدي validator

How the الرمز البريدي format works

Format
5 digits
Example
10000

Things to watch for

  • Format-only check — does not confirm the الرمز البريدي actually exists
  • Always exactly 5 digits with no separators
  • The first two digits mark the routing area and province — Rabat addresses start with 10, Casablanca with 20
Regex for الرمز البريدي
^[0-9]{5}$

A Moroccan الرمز البريدي (postal code) is the 5-digit code Barid Al-Maghrib uses to route mail — for example 10000 for central Rabat. The first two digits work as a province-level routing prefix, so cities in different regions cluster into recognizably different ranges (10xxx for Rabat, 20xxx for Casablanca), while the last three digits handle the finer sorting down to a specific municipality or sector. Anyone validating a Moroccan shipping address, checkout form, or spreadsheet of customer records needs the postal code to be the right length and shape before it’s trusted.

Because the code is a bare 5-digit run with no separator, a code with a transposed pair of digits still produces a plausible-looking province prefix, which is exactly the kind of error a shape check catches without needing to know Morocco’s actual province ranges.

How this validator works

This tool checks that the input is exactly 5 digits with no letters, spaces, or hyphens, entirely in your browser — nothing is sent to a server, and there’s no signup.

What a pass doesn’t tell you

الرمز البريدي carries no check digit, so matching the 5-digit shape is the most a client-side tool can confirm — not that Barid Al-Maghrib has assigned it to a real municipality. Confirming that requires Morocco’s own postal code lookup.

Scope: this page and tool cover postal code format validation only — not address lookup, province matching, or confirming a code is currently in use.

الرمز البريدي FAQ

What do the leading digits of a Moroccan postal code tell you?

The first two digits identify the routing area and province — Rabat addresses start with 10, Casablanca with 20 — while the remaining three narrow it down to a municipality, sector, or delivery zone.

What does الرمز البريدي mean?

It's Arabic for 'postal code' — the code Barid Al-Maghrib (Morocco's national postal operator) uses to route mail, always 5 digits.

Does a correctly formatted الرمز البريدي mean it actually exists?

No. This tool only confirms the string is 5 digits — it doesn't check it against Barid Al-Maghrib's actual assignment list. Confirming a code is real requires Morocco's own postal code lookup.

← More الرمز البريدي validators