MRZ and Driver’s license Generator/Calculator

How and were to generate a passport Machine Readable Passport MRZ code:
MRZ Generator  Calculator –

www.highprogrammer.com/cgi-bin/uniqueid/mrzp

 

https://emvlab.org/mrz/

How and were to generate a Driver’s License number from your information:
Driving license Generator Calculator

www.highprogrammer.com/cgi-bin/uniqueid

How and were to generate a Driver’s License Barcode PDF417 from your information:
Driving license Barcode pdf 417 Generator Calculator

https://pdf417.pro/states/

Driver’s license number:

A number of states encode your name, gender, and date of birth in your license number.

Soundex is a hashing system for english words. You might want to look at further information on how soundex works.

The example soundex is F255, so the example name starts with F, so the name starts with an F, followed by a gutteral or sibilant, followed by a nasal, followed by another nasal. This is correct, as the example person’s last name is “Fakename”

For my license generator, I simply implement this. For my license reverser, I simply take likely guesses. I also generated the Soundex code for the top 10,000 (ish) last names in the US, and I suggest the top 10 for any given code.

Look up your first name on this table:

NameCodeNameCodeNameCode
Albert20Frank260Marvin580
Alice20George300Mary580
Ann40Grace300Melvin600
Anna40Harold340Mildred600
Anne40Harriet340Patricia680
Annie40Harry360Paul680
Arthur40Hazel360Richard740
Bernard80Helen380Robert760
Bette80Henry380Ruby740
Bettie80James440Ruth760
Betty80Jane440Thelma820
Carl120Jayne440Thomas820
Catherine120Jean460Walter900
Charles140Joan480Wanda900
Dorthy180John460William920
Edward220Joseph480Wilma920
Elizabeth220Margaret560  
Florence260Martin560  
Donald180    
Clara140    

If you fail to find your name, look up your first initial on this table:

InitialCodeInitialCodeInitialCodeInitialCode
A0H320O640V860
B60I400P660W880
C100J420Q700X940
D160K500R720Y960
E200L520S780Z980
F240M540T800  
G280N620U840  

Now look up your middle initial on this table:

InitialCodeInitialCodeInitialCodeInitialCode
A1H8O14V18
B2I9P15W19
C3J10Q15X19
D4K11R16Y19
E5L12S17Z19
F6M13T18  
G7N14U18  

Now, if add together the code for either your first name (if possible) or your first initial to the code for your middle inital.

So, the example FFF code is 921. Looking it up, it’s William or Wilma A. If it had been 001, we would simply know at the their initials are A. A. Since the example was generated for “William Andrew Fakename” this is correct.

This portion encodes the month and day you were born on. The general equation is:

General: (birth_month – 1) * month_multiplier + birth_day + gender_mod

Florida: (birth_month – 1) * 40 + birth_day + (male:0, female: 500)

Illinois: (birth_month – 1) * 31 + birth_day + (male:0, female: 600)

Wisconsin: (birth_month – 1) * 40 + birth_day + (male:0, female: 500)

birth_month is the number of months into the year, January is 1, December is 12.

month_multiplier varies by state. Illinois uses 31. Wisconsin and Florida both use 40.

gender_mod varies by state. In Illinois men use 0, women use 600. In Wisconsin and Florida men use 0, women use 500.

If the result is less than 100, add zeroes to the left side to make it 3 digits. (So, January 1st is encoded as “001” for men in Illinois.)

Now about the passport. What is the MRZ code?

The International Civil Aviation Organization, a Quebec based group, developed standards for Machine Readable Travel Documents (MRTDs), including passports and visas. These MRTD make it easy for automated systems to scan a travel document. If a country decides to check all visitors against a known criminals data reading the information automatically with a computer will be much faster and less prone to error than if the immagration agent needs to type the information in by hand.

On a MR Passport there are two lines. Each line is 44 characters long. There are no blank spaces; where one is necessary is it filled with the filler character, a less than sign (<).

All fields are padded with less than signs (<) to fill the required width. There should be no whitespace in the MRZ. Only letters A through Z, digits 0 through 9, and the filler character < are allowed. Some extended letters are mapped to other sets of characters per the following table. The alternate encoding is used when the normal encoding might caused confusion between different names.

The first letter is “P”, designating a passport.

The second character can be assigned by the issuing country to distinguish different types of passports. If unused a < is assigned.

The United States, at least in the cases I’ve seen, doesn’t use this field.

In the example above there is a <, apparently the fictional country of Utopia doesn’t specify specific types, or Anna doesn’t need one.

The issuing country or organization, encoded in three characters. The code is pulled from this table.

CountryCode
AfghanistanAFG
AlbaniaALB
AlgeriaDZA
American SamoaASM
AndorraAND
AngolaAGO
AnguillaAIA
AntarcticaATA
Antigua and BarbudaATG
ArgentinaARG
ArmeniaARM
ArubaABW
AustraliaAUS
AustriaAUT
AzerbaijanAZE
BahamasBHS
BahrainBHR
BangladeshBGD
BarbadosBRB
BelarusBLR
BelgiumBEL
BelizeBLZ
BeninBEN
BermudaBMU
BhutanBTN
BoliviaBOL
Bosnia and HerzegovinaBIH
BotswanaBWA
Bouvet IslandBVT
BrazilBRA
British Indian Ocean TerritoryIOT
Brunei DarussalamBRN
BulgariaBGR
Burkina FasoBFA
BurundiBDI
CambodiaKHM
CameroonCMR
CanadaCAN
Cape VerdeCPV
Cayman IslandsCYM
Central African RepublicCAF
ChadTCD
ChileCHL
ChinaCHN
Christmas IslandCXR
Cocos (Keeling) IslandsCCK
ColombiaCOL
ComorosCOM
CongoCOG
Cook IslandsCOK
Costa RicaCRI
Côte d’IvoireCIV
CroatiaHRV
CubaCUB
CyprusCYP
Czech RepublicCZE
Democratic People’s Republic of KoreaPRK
Democratic Republic of the CongoCOD
DenmarkDNK
DjiboutiDJI
DominicaDMA
Dominican RepublicDOM
East TimorTMP
EcuadorECU
EgyptEGY
El SalvadorSLV
Equatorial GuineaGNQ
EritreaERI
EstoniaEST
EthiopiaETH
Falkland Islands (Malvinas)FLK
Faeroe IslandsFRO
FijiFJI
FinlandFIN
FranceFRA
France, MetropolitanFXX
French GuianaGUF
French PolynesiaPYF
GabonGAB
GambiaGMB
GeorgiaGEO
GermanyD
GhanaGHA
GibraltarGIB
GreeceGRC
GreenlandGRL
GrenadaGRD
GuadeloupeGLP
GuamGUM
GuatemalaGTM
GuineaGIN
Guinea-BissauGNB
GuyanaGUY
HaitiHTI
Heard and McDonald IslandsHMD
Holy See (Vatican City State)VAT
HondurasHND
Hong KongHKG
HungaryHUN
IcelandISL
IndiaIND
IndonesiaIDN
Iran, Islamic Republic ofIRN
IraqIRQ
IrelandIRL
IsraelISR
ItalyITA
JamaicaJAM
JapanJPN
JordanJOR
KazakhstanKAZ
KenyaKEN
KiribatiKIR
KuwaitKWT
KyrgyzstanKGZ
Lao People’s Democratic RepublicLAO
LatviaLVA
LebanonLBN
LesothoLSO
LiberiaLBR
Libyan Arab JamahiriyaLBY
LiechtensteinLIE
LithuaniaLTU
LuxembourgLUX
MadagascarMDG
MalawiMWI
MalaysiaMYS
MaldivesMDV
MaliMLI
MaltaMLT
Marshall IslandsMHL
MartiniqueMTQ
MauritaniaMRT
MauritiusMUS
MayotteMYT
MexicoMEX
Micronesia, Federated States ofFSM
MonacoMCO
MongoliaMNG
MontserratMSR
MoroccoMAR
MozambiqueMOZ
MyanmarMMR
NamibiaNAM
NauruNRU
NepalNPL
Netherlands, Kingdom of theNLD
Netherlands AntillesANT
Neutral ZoneNTZ
New CaledoniaNCL
New ZealandNZL
NicaraguaNIC
NigerNER
NigeriaNGA
NiueNIU
Norfolk IslandNFK
Northern Mariana IslandsMNP
NorwayNOR
OmanOMN
PakistanPAK
PalauPLW
PanamaPAN
Papua New GuineaPNG
ParaguayPRY
PeruPER
PhilippinesPHL
PitcairnPCN
PolandPOL
PortugalPRT
Puerto RicoPRI
QatarQAT
Republic of KoreaKOR
Republic of MoldovaMDA
RéunionREU
RomaniaROM
Russian FederationRUS
RwandaRWA
Saint HelenaSHN
Saint Kitts and NevisKNA
Saint LuciaLCA
Saint Pierre and MiquelonSPM
Saint Vincent and the GrenadinesVCT
SamoaWSM
San MarinoSMR
Sao Tome and PrincipeSTP
Saudi ArabiaSAU
SenegalSEN
SeychellesSYC
Sierra LeoneSLE
SingaporeSGP
SlovakiaSVK
SloveniaSVN
Solomon IslandsSLB
SomaliaSOM
South AfricaZAF
South Georgia and the South Sandwich IslandSGS
SpainESP
Sri LankaLKA
SudanSDN
SurinameSUR
Svalbard and Jan Mayen IslandsSJM
SwazilandSWZ
SwedenSWE
SwitzerlandCHE
Syrian Arab RepublicSYR
Taiwan Province of ChinaTWN
TajikistanTJK
ThailandTHA
The former Yugoslav Republic of MacedoniaMKD
TogoTGO
TokelauTKL
TongaTON
Trinidad and TobagoTTO
TunisiaTUN
TurkeyTUR
TurkmenistanTKM
Turks and Caicos IslandsTCA
TuvaluTUV
UgandaUGA
UkraineUKR
United Arab EmiratesARE
United Kingdom of Great Britain and Northern Ireland 
    – CitizenGBR
    – Dependent territories citizenGBD
    – National (overseas)GBN
    – Overseas citizenGBO
    – Protected PersonGBP
    – SubjectGBS
United Republic of TanzaniaTZA
United States of AmericaUSA
United States of America Minor Outlying IslandsUMI
UruguayURY
UzbekistanUZB
VanuatuVUT
VenezuelaVEN
Viet NamVNM
Virgin Islands (Great Britian)VGB
Virgin Islands (United States)VIR
Wallis and Futuna IslandsWLF
Western SaharaESH
YemenYEM
ZaireZAR
ZambiaZMB
ZimbabweZWE
United Nations Organization
(If indicating nationality,
indicates an UN offical)
UNO
United Nations
specialized agency official
UNA
Stateless (per Article 1 of 1954 convention)XXA
Refugee
(per Article 1 of 1951 convention,
amended by 1967 protocol)
XXB
Refugee (non-convention)XXC
Unspecified / UnknownXXX

The passport number, as assigned by the issuing country. Each country is free to assign numbers using any system it likes. If the number has non-letter or number characters they are replaced with the filler character <.

The general format is “LAST<NAME<<FIRST<NAME<ADDITIONAL<NAMES<<<<<“. The name is entirely upper case. Puncuation (like hyphens) are replaced with the filler character < The surname is given first, then the filler character twice (<<), then the remainder of given names. Separate names in the surname or given name are separated with the filler character < The filler character < pads out the field to fill 39 characters.

Suffixes (Jr, Sr, II, III, etc) are encoded as part of the last name, without punctuation.

If the name is too long to fit the most significant parts of the name are used. Names may abbreviated if necessary to make them fit.

In the above example Anna’s surname is Eriksson, her first and middle names are Anna and Maria. Her name is encoded as

ERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<

George Michael Richards-Stevens Jr. would be encoded as

RICHARDS<STEVENS<JR<<GEORGE<MICHAEL<<<<

Check digits are calculated based on the previous field. Thus, the first check digit is based on the passport number, the next is based on the date of birth, the next on the expiration date, and the next on the personal number. The check digit is calculated using this algorithm.
First, break the input into individual characteres and numbers.

Next, convert non-digits into numbers. A through Z are encoded to 10 through 25. The filler character < is encoded as 0.

< A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
0 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
Now, multiply each number by the corresponding weighting. The first digit is multipled by 7, the next by 3, and the next by 1. The pattern then repeats (7, 3, 1, 7, 3, 1, 7, 3, 1, etc).

Add up the results, then divide by 10. The remainder is the check digit.

As a special case, if the personal number on the second line is not used (and thus entirely filled with the filler character <), the check digit for that section can be replaced with the filler character <.

An example for the input AB2134:

Input: A B 2 1 3 4 < < <
Value: 10 11 2 1 3 4 0 0 0
Weight: 7 3 1 7 3 1 7 3 1
Products: 70 33 2 7 9 4 0 0 0
Sum: 70 + 33 + 2 + 7 + 9 + 4 + 0 + 0 + 0 = 125
Division: 125 ÷ 10 = 12, remainder 5

Check Digit Calculations
First, break the input into individual characteres and numbers.

Next, convert non-digits into numbers. A through Z are encoded to 10 through 25. The filler character < is encoded as 0.

< A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
0 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
Now, multiply each number by the corresponding weighting. The first digit is multipled by 7, the next by 3, and the next by 1. The pattern then repeats (7, 3, 1, 7, 3, 1, 7, 3, 1, etc).

Add up the results, then divide by 10. The remainder is the check digit.

As a special case, if the personal number on the second line is not used (and thus entirely filled with the filler character <), the check digit for that section can be replaced with the filler character <.

An example for the input AB2134:

Input: A B 2 1 3 4 < < <
Value: 10 11 2 1 3 4 0 0 0
Weight: 7 3 1 7 3 1 7 3 1
Products: 70 33 2 7 9 4 0 0 0
Sum: 70 + 33 + 2 + 7 + 9 + 4 + 0 + 0 + 0 = 125
Division: 125 ÷ 10 = 12, remainder 5

Check Digit Calculations
First, break the input into individual characteres and numbers.

Next, convert non-digits into numbers. A through Z are encoded to 10 through 25. The filler character < is encoded as 0.

< A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
0 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
Now, multiply each number by the corresponding weighting. The first digit is multipled by 7, the next by 3, and the next by 1. The pattern then repeats (7, 3, 1, 7, 3, 1, 7, 3, 1, etc).

Add up the results, then divide by 10. The remainder is the check digit.

As a special case, if the personal number on the second line is not used (and thus entirely filled with the filler character <), the check digit for that section can be replaced with the filler character <.

An example for the input AB2134:

Input: A B 2 1 3 4 < < <
Value: 10 11 2 1 3 4 0 0 0
Weight: 7 3 1 7 3 1 7 3 1
Products: 70 33 2 7 9 4 0 0 0
Sum: 70 + 33 + 2 + 7 + 9 + 4 + 0 + 0 + 0 = 125
Division: 125 ÷ 10 = 12, remainder 5

Check Digit Calculations
First, break the input into individual characteres and numbers.

Next, convert non-digits into numbers. A through Z are encoded to 10 through 25. The filler character < is encoded as 0.

< A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
0 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
Now, multiply each number by the corresponding weighting. The first digit is multipled by 7, the next by 3, and the next by 1. The pattern then repeats (7, 3, 1, 7, 3, 1, 7, 3, 1, etc).

Add up the results, then divide by 10. The remainder is the check digit.

As a special case, if the personal number on the second line is not used (and thus entirely filled with the filler character <), the check digit for that section can be replaced with the filler character <.

An example for the input AB2134:

Input: A B 2 1 3 4 < < <
Value: 10 11 2 1 3 4 0 0 0
Weight: 7 3 1 7 3 1 7 3 1
Products: 70 33 2 7 9 4 0 0 0
Sum: 70 + 33 + 2 + 7 + 9 + 4 + 0 + 0 + 0 = 125
Division: 125 ÷ 10 = 12, remainder 5

Prepared by FakeTemplate.Net