EAN-13 vs. UPC-A and the number of digits

EAN-13 and UPC-A are using the same encoding scheme and both contain 13 digits. 

However, the UPC-A barcodes do not show the leading zero of the barcode which is a country code indicator for North America. 


Scandit SDK 6.15.x has introduced an Ean13UpcaClassification class to programatically differentiate between EAN-13 & UPC-A barcodes.

Please see the below example for how this class should be implemented in Android Native, using the onBarcodeScanned(...) callback:


public void onBarcodeScanned(
@NonNull BarcodeCapture barcodeCapture,
@NonNull BarcodeCaptureSession session,
@NonNull FrameData frameData
) {
Barcode barcode = session.getNewlyRecognizedBarocdes().get(0);
// Using the Ean13UpcaClassification class
Boolean isUpca = Ean13UpcaClassification.isUpca(barcode);
Boolean isEan13 = Ean13UpcaClassification.isEan13(barcode);


Please refer to your framework’s documentation to learn more about this addition:

Android Native:
iOS Native:

If you are using any other framework, please see the relevant documentation on our developers page to see how you can implement Scandit's EAN-13/UPC-A classification on your platform.


Classification on Scandit SDK Version 6.14 & Below

If you are currently using Scandit SDK version <= 6.14.x, please reach out to us at for instructions on how to programatically differentiate between EAN-13 and UPC-A barcodes.

In case you want to read more about the EAN-13/UPC-A symbologies, please see the following document:

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request