VIN Scanner SDK

VIN Scanner SDK for Barcode and OCR

Integrate VIN scanning into mobile, web and enterprise applications with barKoder. The VIN Scanner SDK reads VIN barcodes encoded in Code 39, Code 128, Data Matrix and QR Code on every platform, and adds VIN OCR for the printed characters on Android, iOS and the cross-platform frameworks.

VIN Scan VIN Scan

VIN Barcode Scanner SDK

barKoder includes a dedicated VIN scanning mode for automotive workflows such as vehicle inspection, fleet management, service, logistics, rental and dealership applications. A VIN is data, not a barcode type, so the scanner has to read every symbology a VIN can be printed in. VIN mode turns all of them on with settings tuned for 17-character vehicle identifiers.

What VIN mode sets up

  • Code 39, Code 128, Data Matrix and QR Code decoders
  • VIN restrictions, so only VIN-compliant results are returned
  • A wide region of interest across the middle of the viewfinder
  • Full HD camera resolution and slow, thorough decoding
  • One call, one config object or one predefined template
Get a trial license key

Where the VIN ends up

The scanner captures the identifier. Your app decides what happens next:

  • Find a vehicle record
  • Open an inspection
  • Retrieve a rental reservation
  • Attach a work order
  • Update fleet inventory
  • Start a logistics event
  • Fill an insurance claim
  • Update a dealership record

For a full walkthrough, read How to add VIN scanning to mobile and web apps.

VIN barcode scanning and VIN OCR

Some vehicles carry a readable VIN barcode. Others only show the 17 characters on a windshield plate, a door label, a document or a metal part. barKoder covers both cases.

VIN barcode scanning

Reads VIN data encoded in Code 39, Code 128, Data Matrix and QR Code.

  • Android and iOS
  • Web, through the WebAssembly-based Web SDK
  • Flutter, React Native, Capacitor, Cordova, .NET MAUI and NativeScript
Web VIN example

VIN OCR

Reads and validates the 17-character VIN from visible text when there is no barcode, or when the barcode can't be decoded. The SDK tries the VIN barcode first and falls back to OCR on the printed characters.

  • Android and iOS
  • Flutter, React Native, Capacitor, Cordova, .NET MAUI and NativeScript
  • Not yet in the Web SDK
  • Needs a license key with OCR enabled, SDK 1.6.7 or newer
Android VIN OCR example

Add a VIN scanner to your app

Enable the four VIN decoders, set the region of interest and turn on VIN restrictions. This is the Web SDK version from the barKoder docs.

VIN mode in a web app

JavaScript
Barkoder.setEnabledDecoders(
    Barkoder.constants.Decoders.Code39,
    Barkoder.constants.Decoders.Code128,
    Barkoder.constants.Decoders.DataMatrix,
    Barkoder.constants.Decoders.QR
);

Barkoder.setCameraResolution(Barkoder.constants.CameraResolution.FHD);
Barkoder.setDecodingSpeed(Barkoder.constants.DecodingSpeed.Slow);

Barkoder.setRegionOfInterest(0, 35, 100, 30);

//Only VIN results are returned (only affects Code39)
Barkoder.setEnableVINRestrictions(Barkoder.constants.EnableVINRestrictions.Enable);

The same setup is available as a configureBarkoder config or as the predefined vin template.

Turn on VIN OCR on Android

Add the ML Kit text recognition dependency, then enable OCR in the decoder configuration:

Java
Barkoder.SetCustomOption(bkdView.config.getDecoderConfig(), "enable_ocr_functionality", 1);

VIN examples for every SDK:

VIN encoding with Code 39 barcodes

Code 39 is still found on many older cars in use today. It encodes letters A-Z, digits 0-9 and a few special characters, which fits an alphanumeric VIN.

As a VIN, Code 39 follows two extra rules. The length is fixed, typically 17 characters. The check character, optional in ordinary Code 39, is required. These rules help the scanner recognize a VIN barcode, and they are why VIN scanning needs its own mode.

With Segment Decoding®, barKoder reads Code 39 VINs that are deformed along the Z-axis: printed on paper for inventory lists or taped to a car window.

VIN encoded in a Code 39 barcode
A 17-character VIN in Code 39
Distorted Code 39 VIN barcode
Segment DecodingDeformed sample
Arched and warped Code 39 VIN barcode
Segment DecodingArched and warped
Code 39 VIN barcode with a bulge
Segment DecodingBulged surface
Code 39 VIN barcode with fisheye distortion
Segment DecodingFisheye distortion
Code 39 VIN barcode broken into steps
Segment DecodingStepped, folded label
Blurred Code 39 VIN barcode
Segment DecodingBlurred sample
Heavily blurred Code 39 VIN barcode
Segment DecodingHeavier blur
Test your own VIN labels Use a trial license to see how your hardest samples behave. Start an SDK trial

Code 128 barcodes and VIN implementation

Code 128 is a high-density alphanumeric 1D symbology that is widely used to encode VINs.

Why Code 128 suits VINs

  • Higher data density than Code 39, so the same VIN fits in less space
  • A built-in checksum that verifies the encoded data during scanning, which Code 39 lacks
  • The full 128-character ASCII set, against 39 characters in Code 39

Deformed Code 128 VINs

Segment Decoding® also reads highly distorted Code 128 VIN codes. In the demo app, turn on Enable Misshaped Code Capture inside VIN mode to try it.

Arced Code 128 VIN barcode
Segment DecodingArced
Bulged Code 128 VIN barcode
Segment DecodingBulged
Code 128 VIN barcode with a wavy distortion
Segment DecodingWavy distortion
Code 128 VIN barcode bent like a flag
Segment DecodingBent like a flag

Damaged QR Code and Data Matrix VINs

2D codes store more data in less space. QR Code is less common for VINs than Code 39 and Code 128, but appears in specific VIN workflows. Data Matrix is used where more information has to fit in a compact area.

QR Codes are easy to read with open-source scanners until their finder patterns are damaged. Then most scanners fail.

MatrixSight® reads VIN QR Codes with damage to both the finder and the alignment patterns. It also reads Data Matrix VINs that are missing finder or timing patterns, or that have random damage in the data area.

VIN encoded in a Data Matrix code
A VIN in Data Matrix
VIN QR Code missing its top-left finder pattern
MatrixSightQR Code, top-left finder missing
VIN QR Code missing both top finder patterns
MatrixSightQR Code, both top finders missing
VIN Data Matrix missing its finder pattern
MatrixSightData Matrix, finder pattern missing
VIN Data Matrix missing finder and timing patterns
MatrixSightData Matrix, finder and timing missing
VIN Data Matrix with random damage in the data area
MatrixSightData Matrix, damage across the data
VIN encoded in a QR Code
ReferenceAn intact QR Code VIN

Try VIN mode in the demo app

Install Barcode Scanner by barKoder on iOS or Android, then follow these steps.

Demo app home screen with the VIN mode
Step 1Open VIN mode.
Demo app scanner with the settings button
Step 2Open settings from the top-right button and turn on misshaped code scanning, which is off by default.
Demo app settings with Enable Misshaped Code Capture
Step 3The setting is called Enable Misshaped Code Capture.
Page with several Code 39 VIN barcodes for multi-scanning
MultiscanTurn on continuous scanning and read several VIN barcodes on one page.

Scan VINs on every major platform

VIN mode is documented for native Android and iOS, the Web SDK and every cross-platform framework. VIN OCR is available on the mobile SDKs and frameworks.

  • 7 native & desktop SDKs
  • 6 cross-platform integrations
  • One consistent scanning core

VIN scanning in production

Automotive teams that replaced manual VIN entry and older scanners with barKoder.

Club Assist

Automotive · Australia · .NET MAUI

Replaced Cognexafter its SDK was deprecated

Two battery apps capture VINs with barKoder: faster scans, less manual VIN entry, and VINs that previously failed now read in low light and on damaged, low-contrast labels.

The product works great, and we are very satisfied overall.Rich Dadisman, Club Assist
Read the Club Assist story →

eCarMover.com

Auto transport · USA · Web SDK

Thousandsof VINs scanned by drivers in the field

Drivers scan VINs in the browser inside a .NET Blazor app hosted in Azure, with no native mobile app, instead of typing them in.

Read the eCarMover story →

The Dealer Plate

Auto dealerships · React Native

Under 10 sinstead of about 2 minutes of manual entry

Dealership staff scan with ordinary phones, including small 1D codes and dense PDF417, in glare, low light and at awkward angles. Transcription errors have effectively disappeared.

Read The Dealer Plate story →

More automotive stories: Laser Appraiser now captures VIN barcodes that were previously unreadable.

Try barKoder on your phone or in your browser

Install the free barKoder demo app, or open the web demo, and scan your own barcodes before you integrate the SDK.

iPhone and iPad

barKoder demo app for iOS

Scan with your camera, or point it at the QR code to open the App Store.

Download on the App Store
QR code linking to the barKoder demo app on the App Store

Android phones and tablets

barKoder demo app for Android

Scan with your camera, or point it at the QR code to open Google Play.

Get it on Google Play
QR code linking to the barKoder demo app on Google Play

Any modern browser

barKoder web demo

Runs the Web SDK in your browser, on desktop or mobile, with nothing to install.

Open the web demo
QR code linking to the barKoder web demo

Test with known samples. Print or display the testing sheet and scan each 1D and 2D barcode with the demo app. The data sheet summarizes the SDK for your team.

VIN scanner SDK questions

What is a VIN barcode scanner SDK?

It's software you build into your own app to detect and decode barcodes that contain Vehicle Identification Numbers. barKoder's VIN mode reads VIN data encoded in Code 39, Code 128, Data Matrix and QR Code and returns the VIN to your app's workflow.

Which barcode formats contain VIN data?

There is no single VIN barcode. Older vehicles and paperwork use Code 39, many labels use Code 128, and newer workflows use Data Matrix and QR Code. VIN mode enables all four.

Can barKoder read a VIN without a barcode?

Yes, with VIN OCR. It reads and validates the 17-character VIN from visible text, for example on a windshield, label, document or metal plate. The SDK tries the barcode first and falls back to OCR. VIN OCR needs a license key with OCR enabled.

Which platforms support VIN OCR?

VIN OCR is documented for Android, iOS, Flutter, React Native, Capacitor, Cordova, .NET MAUI and NativeScript, from SDK version 1.6.7. The Web SDK reads VIN barcodes but doesn't include VIN OCR yet. On Android, VIN OCR uses the ML Kit text recognition library.

Can I scan VINs in a web app?

Yes. The WASM Barcode Scanner SDK runs VIN mode in the browser, in any browser that supports WebAssembly and ResizeObserver. Follow the Web VIN example, or try VIN scanning first in the barKoder web demo.

What happens when a VIN barcode is damaged or deformed?

For Code 39 and Code 128, Segment Decoding® reads barcodes that are bent, warped or curled. For QR Code and Data Matrix, MatrixSight® reads codes with missing finder, timing or alignment patterns. Results still depend on the damage, lighting and camera, so test with your own samples.

Where can I get sample VIN barcodes for testing?

Create Code 39, Code 128, Data Matrix or QR Code test barcodes with the free barKoder Barcode Generator, or scan the sample images on this page with the demo app. Real labels from your own vehicles are the best final test.

Does VIN scanning need an internet connection?

Only for the license check, which each device needs at least once every 30 days. Scanning runs locally on the device, and the SDK doesn't store personal information retrieved from scanning.

Add VIN barcode scanning and VIN OCR to your app

Test VIN mode on your own vehicles and labels with a free 30-day trial, or talk to an SDK expert about your automotive project.