Article updated in February 2026 to reflect the latest developments in Moroccan passports and online document verification tools.
The Moroccan passport is an official document widely used as proof of identity in many contexts, including KYC checks, international travel, administrative procedures, digital platforms, and banking processes.
Like any identity document, it may be subject to document fraud attempts: expired passports, visual alterations, inconsistencies between visible information and the MRZ, or deliberate modification of certain data.
How can you verify a Moroccan passport online and ensure that the document presented is authentic?
This guide answers that question through 3 essential verification checks.
Need more information on how to verify the authenticity of your ID documents ? Check out our comprehensive guide to verifying ID documents, which includes all the resources available !
Check 0: automatic online verification of a Moroccan passport
Before any visual inspection, it is now possible to perform an initial automated verification using a simple image of the passport.
This step allows in particular:
- automatic reading of the MRZ
- validation of check digits
- consistency checks across fields (name, date of birth, sex, nationality, document number, expiration date)
- detection of common data entry errors or inconsistencies
⚠️ There is no public database allowing the official validation of a Moroccan passport.
Online verification therefore relies on documentary analysis and must be complemented by a visual inspection of the document.
Check 1: general appearance of the Moroccan passport
When access to the original document is possible, the first step is to examine the overall appearance of the passport.
The document must not show any signs of:
- cutting or tearing
- delamination or gluing
- overprinting or visible modification
Particular attention should be paid to:
- the biographical data page
- the photo area
- the edges of the document
- embossed or raised printed areas
Any signs of scraping, heating, partial replacement, or retouching should be considered a red flag requiring further investigation.
Check 2: cross-checking and consistency of information
The second step consists of verifying the consistency of the visible information on the passport and its alignment with the data encoded in the MRZ.
Priority elements to cross-check include:
- Document type: visible on the passport and at the beginning of the first MRZ line
- Document number: shown on the data page and in the second MRZ line
- Date of birth: visible on the passport and in the MRZ (YYMMDD format)
- Surname and given name(s): present on the document and in the first MRZ line
- Holder’s sex: indicated by “M” or “F”, visible on the passport and in the MRZ
- Expiration date: visible on the passport and in the MRZ
- Issuing country and nationality: consistent with the ISO codes used in the MRZ
Any discrepancy, even a minor one, between the visible fields and the MRZ should be considered a warning sign.
Document type
You can find the document type at the top left and at the beginning of the first line of the MRZ band.

Moroccan passport document number
The document number can be found in two different places: at the top right and at the beginning of the second line of the MRZ band.
The two must be identical:

Date of birth
You can also find the holder’s date of birth in two different places: in the middle right and in the middle of the second MRZ line in YYMMDD format:

Surname and given name(s)
The same goes for surnames and given names, which can be found on the document and in the first line of the MRZ band:

Holder’s gender
The holder’s gender is symbolized by “ M ” for men (male) and “ F ” for women (female). This information is found on the front and in the second line of the MRZ band:

Document expiration date
Another element that appears twice on the document is the expiration date, which can be found on the front as well as in the second MRZ line in YYMMDD format:

Issuing country
The issuing country can be found in two places on the document: at the top of the front and at the beginning of the first line of the MRZ band.
Nationality
The holder’s nationality can be found in the second MRZ line in ISO 3166-1 format:

Individuals, do you occasionally need to verify one or more identity documents ?
Professionals, do you need to integrate proof of identity validation into one of your business processes, including all European identity cards and global passports ?
Check 3: MRZ and check digit verification
The Moroccan passport includes a two-line MRZ compliant with ICAO standards.
The MRZ contains the main document data in a standardized format and integrates five check digits designed to detect:
- reading errors
- data inconsistencies
- many common forgery attempts
MRZ analysis makes it possible to:
- verify the document structure
- mathematically validate the encoded data
- detect transcription errors
The check digits rely on the standard ICAO algorithm using fixed weights (7, 3, and 1), making this verification reliable, fast, and easily automated.
Structure of the MRZ band of the Moroccan passport
First line

- Document type : 2 characters, a code indicating the type of document, represented by the letters “P<”.
- Issuing country : 3 characters, the ISO 3166-1 alpha-3 code of the issuing country.
- Surname(s) : the holder’s surname(s), separated by a chevron “<”.
- Given name(s) : the holder’s given name(s), separated from the surname by two chevrons, and from each other by a chevron “<”.
Second line

- Document number : 9 characters, the passport number that is also printed on the document.
- Check digit : 1 character, the check digit for the document number.
- Nationality : 3 characters, the holder’s nationality.
- Date of birth : 6 digits, the holder’s date of birth in YYMMDD format.
- Check digit : 1 character, the check digit for the date of birth.
- Sex : 1 character, the holder’s sex (“M” or “F”).
- Expiration date : 6 digits, the passport’s expiration date in YYMMDD format.
- Personal number : 7 characters, the holder’s personal number.
- Check digit : 1 character, the check digit for the personal number.
- Check digit : 1 character, the check digit of the concatenation of line 2 characters 44–54, line 2 57–64, line 2 65–87.
Verify a Moroccan passport using the MRZ line security keys
A Moroccan passport contains 5 check digits (or security keys) that validate the information preceding them.
They help prevent transcription errors or alterations, whether intentional or not.
How does the algorithm work?
The algorithm used to create and validate check digits is common to all identity documents: characters have a weight, which is multiplied by a factor depending on their position in the string (7, 3, and 1).
Digits keep their value (“ 0 ” equals 0, “ 1 ” equals 1, etc., up to “ 9 ” which equals 9), the chevron “ < ” also has a value of 0, while letters start at 10 for “ A ”, 11 for “ B ”, up to 35 for “ Z ”.
Example
Let’s take as an example the check digit for the date of birth of the specimen above.
The character string to validate is: “001225”.
To calculate the check digit, we proceed as follows:
– “0” has a value of 0 and is in the first position, so it must be multiplied by 7: 0 * 7 = 0
– “0” has a value of 0 and is in the second position, so it must be multiplied by 3: 0 * 3 = 0, which we add to the previous 0, i.e., 0 + 0 = 0.
– 1 has a value of 1 and is in the third position, so it must be multiplied by 1: 1 * 1 = 1, which we add to the previous 0, i.e., 0 + 1 = 1.
– 2 * 7 = 14 and 14 + 1 = 15
– 2 * 3 = 6 and 6 + 15 = 21
– 5 * 1 = 5 and 5 + 21 = 26
We therefore obtain a total of 26, from which we extract the modulo 10 (the remainder of the Euclidean division by 10), which amounts to keeping only the last digit, i.e., “6”.
Our check digit is therefore valid because the document shows 6!
Conclusion
You now have a structured and reliable method to verify a Moroccan passport online: MRZ analysis, cross-checking of information, followed by visual inspection of the document.
Without specialized equipment, this combined approach already allows the detection of a large proportion of common document fraud attempts.
To go further, it is also possible to use an online document verification solution.
For example, TrustDocHub enables automatic verification of a Moroccan passport from an image, with results delivered directly within the application.
Individuals, do you occasionally need to verify one or more identity documents ?
Professionals, do you need to integrate proof of identity validation into one of your business processes, including all European identity cards and global passports ?




