Almost every interaction with a business requires sharing identity information, whether ordering online, registering at a hospital, or opening a bank account. This step of customer onboarding is a critical one. If it’s too slow, or too much information is demanded, users back out, and businesses lose conversions.
In some industries, collecting ID data is a legal requirement. Banks, for example, must comply with know-your-customer rules. Local laws may also apply: In Spain, hotels must record and report over 40 data points from each guest within 24 hours, with fines of up to €30,000 for non-compliance (Royal Decree 933/2021).
The good news: ID card scanners automate much of the onboarding process. In this article, we look at how this technology works – and at what to keep in mind when choosing a solution for your business.
What is on an ID card?
Identity documents contain personal information in both human- and machine-readable formats. Common elements are:

- PDF417 barcode
Found on US and Canadian driver’s licenses, plus some national IDs in Latin America and Africa.
- Machine-readable zone (MRZ)
Characters printed on passports, visas, residence permits, and many ID cards worldwide. They are standardized and provide built-in check digits for verification.
- Visual Inspection Zone (VIZ)
The part of an ID document with printed text meant for humans to read, such as the holder’s name, date of birth, and document number. The VIZ can also be scanned, but since its format varies by country, and there are no check digits, verification is harder and errors more likely.
How to extract data from PDF417 barcodes on IDs
A barcode scanner first decodes the PDF417 into a long alphanumeric string. This raw data is unstructured and not yet meaningful for humans or backend systems.
To make the data usable, the string is parsed into predefined fields according to the issuing authority’s format (for example, the AAMVA in the United States). This step transforms the string into recognizable components such as “First Name: John,” “Date of Birth: 1985-11-22,” or “Expiry Date: 2029-04-30.”
Once parsed, the information is returned in the form of structured key-value pairs.

How to extract data from MRZs: ID Card OCR
Although an MRZ mostly looks like a string of random letters, numbers, and symbols, it actually encodes personal details in a highly structured way. The MRZ is designed for reliable reading with OCR (optical character recognition), hence the special font (OCR-B), filler characters (“<”), and layout.
Each position in the MRZ string corresponds to a predefined data field. The exact layout, however, depends on the document type:
- Passports (TD3): Two MRZ lines with 44 characters each, the most common layout worldwide.
- National ID cards (TD1/TD2): Three or two lines, with layout varying by issuing authority. Common in many countries and also used for residence permits.
- Visas (MRV-A/MRV-B): Two lines, with sizes and designs varying by country.
To unlock the contained information, modern ID card scanners follow a series of steps:
- Image capture and preprocessing
The scanner first captures an image of the ID. The image is then optimized for OCR by correcting perspective, reducing glare, and sharpening the text to enhance legibility.
- Character recognition
Next, the OCR engine locates the MRZ, segments it into lines, identifies the individual glyphs, and outputs a raw string.
- Parsing into structured fields
The raw string is then split into predefined data fields by position, in accordance with ICAO Doc 9303 standards. The data values themselves are still raw and unverified.
- Verification with check digits
Next, the fields are validated. Important individual fields such as passport number, date of birth, and expiry date each have their own check digit. Many documents also feature a final composite check digit over several fields. If the values don’t match, the scanner won’t be able to validate the MRZ. This may indicate that the document was tampered with.
- Machine-readable output
Finally, the scanner delivers the extracted information as key-value pairs, ready for immediate processing in backend systems.

Because of their combination of standardization, defined parsing structure, and built-in check digits, MRZs are one of the most reliable sources for fast and reliable data extraction from IDs.
What is the difference between hardware and mobile ID card scanners?
So far, we’ve looked at how ID data can be extracted through barcodes and MRZs. The next question is how this capability is delivered in practice.
Many businesses still rely on manual data entry. Staff members or the customers themselves type information from the ID into a form. While simple, this approach is time-consuming and prone to errors such as typos or missing fields, creating problems later in the process.
To mitigate these issues, organizations have traditionally used dedicated hardware scanners at their physical locations. These devices work reliably, but this approach demands expensive purchases, ongoing maintenance, and staff training. Customers, meanwhile, still have to fill in their forms manually.
Mobile scanning solutions are a flexible and modern alternative to traditional hardware scanners. As they leverage smartphone cameras and software, they offer several advantages:
- Cost and scalability: Lower initial investment compared to dedicated hardware. A bring-your-own-device (BYOD) approach minimizes costs, and scaling to new locations only requires installing an app.
- Portability: IDs can be scanned anywhere: in the field, at events, on the move.
- Faster deployment: Updates and rollouts happen through ordinary app updates rather than hardware procurement and installation.
- Improved user experience: Customers can scan their IDs themselves for onboarding, reducing friction and staff involvement.
- Versatility: Smartphones are multi-purpose devices. ID scanning can easily be combined with features like face matching, NFC reading, or digital signatures. Beyond this, they can be used for other business tasks such as inventory management or customer communication.
What should you consider when choosing an ID card scanner?
What the right ID scanner is depends on your specific use case and industry. In finance or insurance, data security and regulatory compliance are top priority. In retail, speed and ease of use matter more, as staff are working directly with customers.
Generally, the most important factors are the following.
ID document type coverage
An effective ID scanning solution must support all documents relevant to your use case. The Scanbot MRZ Scanner SDK is built for the ICAO 9303 standard, which covers TD1, TD2, TD3, MRV-A, and MRV-B formats. In addition, the Barcode Scanner SDK includes a parser for PDF417 codes, making it compatible with U.S. driver’s licenses and other North American IDs.
Accuracy and speed
Speed and accuracy are critical in digital onboarding. As a rule of thumb, a practical solution has to capture and parse data in one to two seconds under normal conditions. Anything slower risks interrupting the flow and frustrating end users.
Real-world performance is more important than ideal test cases. The scanner must remain reliable when faced with worn or slightly damaged documents, glare from plastic card surfaces, or poor lighting conditions.
Good performance despite poor circumstances reduces the need for repeated scans, keeps onboarding smooth, and minimizes support overhead.
User experience (UX)
An ID card scanner must be simple and intuitive, regardless of how tech-savvy the user is. If the process feels confusing or unreliable, users are likely to abandon it.
Several features and UX best practices make the scanning process smoother:
- User guidance: Overlays, edge detection, and framing guides help users position the document correctly and prevent issues caused by glare or poor alignment.
- Real-time feedback: Visual signals, vibration, and sound confirm a successful scan and prevent unnecessary repeats.
- Accessibility: Options such as larger text, high-contrast modes, or screen reader support open the scanner to a wider audience.
- Error handling: Clear error prompts like “move closer” or “reduce reflections” enable users to resolve issues without frustration.
By combining these features, an ID scanner can shorten onboarding, reduce errors, and deliver a seamless experience for customers and staff.
Data security and compliance
Identity documents contain highly sensitive personal data, which makes compliance with data protection laws essential. This is especially important in sectors such as finance, healthcare, and insurance, where regulatory requirements are particularly strict.
On-device processing
The way data is processed plays a major role. Scanners and parsers that handle all information directly on the device, rather than on a server, have no need to transmit personal data over the network. This minimizes exposure and enhances compliance with laws such as the GDPR, HIPAA, and CCPA.
Offline scanning
A closely related question is whether the solution offers true offline scanning. Some providers process data locally but still send analytics or usage information to third parties. They may even require an internet connection to function. With the Scanbot SDK, all processing remains fully offline, and no data ever leaves the device. This also keeps the scanner reliable even without network connectivity.
Encryption
Encryption provides another layer of protection by safeguarding data against unauthorized access, both during processing and while it is temporarily stored on the device.
Together, on-device processing, offline functionality, and strong encryption safeguard sensitive information and reduce regulatory risks.
Integration and developer experience
A good ID scanning solution must be as easy for developers to implement as it is for users to operate. Integration should not add unnecessary complexity or slow down deployment of your app or website.
Key factors to consider include:
- Cross-platform support: Compatibility across iOS, Android, and web ensures the scanner reaches all of your users. Cross-platform support minimizes the effort of catering to a user base with a variety of devices.
- Clear documentation: Well-structured API references, sample projects, and tutorials allow development teams to get started quickly and reduce frustrating trial-and-error.
- Developer support: Responsive assistance by the provider’s engineering team helps resolve issues fast and prevents rollout delays.
- UI customizability: Ready-to-use UI components simplify setup, while customization options ensure the scanner matches the look and feel of your app.
What about open-source scanning software?
Open-source libraries have their appeal, but they come with risks. Data security is a concern, as vulnerabilities may not be fixed quickly. Maintenance and updates are not guaranteed, which can result in compatibility issues with very new or very old devices, or with framework updates. Finally, the absence of dedicated support makes each of these problems more difficult to resolve.
For these reasons, many businesses choose commercial solutions that provide stronger security, consistent updates, and reliable support. Once you decide to go with a commercial option, the next question is pricing.
Pricing
When you pay for a solution, you want the best return on your investment. The pricing model is a critical factor in this – it has to be compatible with your specific use case.
Most providers have one of two basic pricing models:
- Flat fee: A fixed annual or monthly price, independent of usage or the number of devices. This model gives businesses cost certainty and predictable budgeting. The Scanbot SDK comes at a fixed annual fee.
- Volume-based pricing: Costs are tied to usage. This can be more economical for smaller projects or for workloads that fluctuate over time.
It is also important to consider scalability. A pricing model that prevents unexpected or disproportional costs helps your business grow.
Testing
Thorough testing is crucial before you commit to an ID scanning solution. For the results to be meaningful, the testing environment should mirror your real use case as closely as possible.
Several factors are particularly important when trying out scanners:
Test with a wide range of real documents
An ID scanner may look great in demos, but real-world identity documents come in hundreds of formats. Even within the same category (like national ID cards), layouts, fonts, and security features can vary by country and issuing authority. So, test the scanner with the kinds of documents your users will actually present.
Test in real-world conditions
Lab conditions don’t reflect reality. Users will scan IDs at check-in desks, outdoors, or in dark hallways. Test how the scanner performs in difficult conditions: tilted cards, glare from plastic surfaces, poor or uneven lighting, even slightly damaged IDs, such as worn and scratched cards.
Test performance across devices
Not every user has the latest iPhone. Some use older or lower-end devices with weaker cameras. Test the solution on a wide range of smartphones, from budget to high-end phones.
Curious to test the Scanbot MRZ Scanner SDK or the Scanbot U.S. Driver’s License Scanner SDK? Request your free trial license to integrate it into your app, or download the demo app.
Conclusion
Customer onboarding doesn’t have to be a conversion killer. With the right ID card scanning solution, businesses can transform a notoriously slow, error-prone process into a seamless experience.
What the best solution is comes down to your specific needs for reliability, security, scalability, and support. As businesses increasingly prioritize user experience and compliance, however, free offers fall short. Commercial ID scanning solutions deliver the winning combination of accuracy, flexibility, and long-term reliability that modern businesses require.
FAQ
What shows up when an ID is scanned?
When scanning the MRZ on an ID card, passport, or visa, the scanner extracts standardized fields. These typically include:
– Document type code
– Document number
– Surname
– Given names
– Gender
– Date of birth
– Date of issuance
– Date of expiration
– Nationality
– Issuing authority
The exact fields depend on the document type, as defined in the ICAO 9303 standards.
How to scan an ID card barcode?
The barcode on the back of many driver’s licenses and ID cards is a PDF417. While many barcode scanners can technically read it, their raw output will be a long alphanumeric string.
To make it useful, a dedicated parser is required, which converts the raw string into human-readable fields such as name or date of birth. With the Scanbot U.S. Driver’s License Scanner SDK, this happens instantly. Try it out in the demo app.
Can ID scanners detect fake IDs?
ID scanners can identify inconsistencies by checking built-in security features. For example, MRZs include check digits that flag errors if the values don’t add up. Some scanners can also validate formatting rules or compare fields across the document.
However, dependable fraud detection – such as spotting high-quality counterfeits – typically involves additional verification methods, like hologram checks or database cross-references.