Take or upload photo of passport
Use optical character recognition to read the machine-readable zone of the passport.
When to use this pattern
If users take or upload a photo, the system should use optical character recognition (OCR) to read the machine-readable zone (MRZ) at the bottom of the passport page. Consider which pieces of data in the MRZ you actually need to capture.
This method is less trustworthy than reading directly from the chip, but more trustworthy than manual data entry.
You may ask users to take or upload a photo, in order to scan the chip.
How it works
You should explain why they need to take a picture of their passport, and provide some helpful tips. Consider providing in-camera guidance, indicating when the passport is lined up and readable.
The photo or scan must show:
- all 4 corners of the personal details page
- your personal details, including the photo of you
- the machine-readable zone (MRZ)
The MRZ is 2 lines of letters, symbols and numbers at the bottom of the personal details page on your passport:
The photo or scan must be:
- clear and in focus
- without glare or reflections
Consider what users can do if they hit a barrier. For example, if they cannot take a good enough photo, can they enter data manually.
Consider automated checks to check the quality, such as orientation, shadows, 4 corners in the frame. You should consider the error messages and feedback to help users take a better photo.
Check the information
There is a small chance that the computer misreads the characters.
Use check your answers so that users can check that the information has been read correctly. You’ll need to explain that the information may look different, due to transliteration, translation, truncation or formatting. Only show the information that you’re storing and need to use in the check answers. For example, if you’re not storing or using their sex, then don’t show it.
Consider the format of the data when asking users to check. The format of dates does not make a huge different to understanding. Make sure you clearly explain what format the dates are in.
Consider if you need to collect their name from the passport, and whether you need the name in the machine-readable zone or on the visual display.
The names stored on the chip may be truncated. The names are identical to those in the machine-readable zone. They may appear different in the visual display of the passport, it may be:
- truncated to 39 characters
- transliterated into the 26 character Latin alphabet
- diacritics are removed
Consider how to explain to users that their name might look different to their name on the page.
Date of birth century
The date of birth stored on the chip only has 2 digits for the year. You may need to ask users for the century to confirm whether the year is 1920 or 2020, if it’s not obvious from context.
The nationality in the machine-readable zone is stored as a 3-letter code. These mostly relate to countries. Consider whether to show the 3-letter code or the associated country name.
The nationality is the visual part of the passport will not always match the 3-letter code or the associated country name.
Additional MRZ information
The MRZ may contain additional information that some countries use. You should ignore these optional pieces of data.
Consider that users may need more than one method for capturing the information. What do they do if they hit a barrier?
This pattern is used by:
- an electronic visa waiver scheme
- Apply for a visa
- Confirm your identity (Generic identity verification)
- Update your UKVI account details
Help us improve this pattern
This pattern needs improving. We need evidence about:
- asking for information from emergency passports
- asking for information from other identity documents, such as national identity cards, UK residence card, biometric residence card, biometric residence permit
- whether to label nationality as country of nationality when showing users the information read from the photo