An MRZ is the text at the bottom of documents such as national identity cards, passports, visas, residence permits or other documents which contain a specific set of characters which allow them to be easily read by a machine.
Passports usually contain the following data in the MRZ
- Document Type (Sometimes 'P' is used to identify passports)
- Type subtype (Sometimes used to differenciate between official/service or diplomatic passports)
- Issuing country (USA for the United States, GBR for a British Citizen, FRA for French Citizens)
- Name (Last name followed by given name/names)
- Passport/Document number
- Check Digit
- Date of birth (YYMMDD)
- Check digit
- Sex (M, F or <)
- Document expiration date (YYMMDD)
- Check digit
- Personal identification number
- Check digit
- Final check digit
Travel permits such as visas often implement an MRZ and usualy replace the Document type with V or I, A, C or something similar with a subtype such as T or < or another character. For example, a tourist visa from Hungary may start with VTHUN123456<
This project was made for educational purposes to try and generate an MRZ or to decode an MRZ using the Python programming language. This program currently supports only TD3 type passports. Currently, this program cannot decode or find an MRZ from an image but the feature has been planned and may be implemented in a future version.
I<UTOD231458907<<<<<<<<<<<<<<<
7408122F1204159UTO<<<<<<<<<<<6
ERIKSSON<<ANNA<MARIA<<<<<<<<<<
I<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<
D231458907UTO7408122F1204159<<<<<<<6
P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<
L898902C<3UTO6908061F9406236ZE184226B<<<<<14
V<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<
L8988901C4XXX4009078F96121096ZE184226B<<<<<<
V<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<
L8988901C4XXX4009078F9612109<<<<<<<<
Devlopment for this project started on: Oct/19/2021.