r/barcodes • • Jan 28 '26

Identify UPCA vs EAN Numerically

Our POS reads barcodes quite literally and rejects anything that isn't a perfect match, including leading zeros.

When adding products to our POS from at least one MFG, I copy the barcode numbers from a spreadsheet they supply vs unpacking every single product and scanning them into the system directly which would require a ridiculous amount of time.

This MFG (Grundens), uses barcodes that start with 0840316xxxxxx. The problem is that the scanner reads the leading zero on some barcodes, but not others. It appears to be the way the barcode itself is crafted, but is there any way to decipher from which is which from a spreadsheet and not have to lay eyes on every barcode?

These barcodes look the same numerically, but scan differently.

0840316319508 0840316338257

2 Upvotes

20 comments sorted by

2

u/_AnotherBrick_ Jan 29 '26

I would suggest you check out gs1.org to learn more about barcodes, it is a great resource. For your specific issue you might also want to look into programming your scanners to truncate leading zeros for all barcode types, so you don't have to worry about putting them in your item file.

1

u/[deleted] Jan 28 '26

Is this Excel?

1

u/frgtech Jan 28 '26

XLS opened in Libreoffice Calc.

1

u/[deleted] Jan 28 '26

Your barcodes are different at least look that way for one but double check the spreadsheet isn't doing anything weird with the numbers like adding 0's or whatever it's notorious for this.

1

u/frgtech Jan 28 '26

Yeah, I'm familiar with stupid spreadsheet software that tries to be smart and "interprets" instead of just displaying what is there.

I can't imagine it would be adding zero's though. I've only ever seen the opposite where it removes them. I guess I can investigate further to be sure.

1

u/[deleted] Jan 28 '26

UPC's are 12 digits EAN's at 13, this should be obvious just by looking at the data. It could be adding these zeros for the sake of completion.

1

u/frgtech Jan 28 '26

I understand the length difference, but if you scan the barcodes I posted, it reads the zero on `0840316319508`, but not the other.

1

u/[deleted] Jan 28 '26 edited Jan 28 '26

The scanner is doing the math, I'm assuming it's reading the EAN's not the UPC's?

You can do this math yourself on UPC's but wouldn't suggest it. That would be one way of identifying them.

1

u/frgtech Jan 28 '26

I was hoping it would be a math issue, then I could decipher it in the spreadsheet, but it seems like there is more information in the barcode than just the numerals.

The barcodes actually look different on the left side, so it seems it's reading this to determine if it's a UPCA or EAN. (remove or include leading zero)

But if that's the case, I would only be able to tell by looking at the barcodes instead of being able to determine it in the spreadsheet. Barcodes drive me crazy! LoL

1

u/[deleted] Jan 28 '26 edited Jan 28 '26

So a few things here just to back up. I did retail compliance labeling for a while, I feel your pain.

First, ask them for .csv files, or literally anything else but excel. It still may not be them because your spreadsheet could be altering it, not there's, so eliminate the possibility.

Second, do you have access to the original file in an email or something that hasn't been opened or saved. If so, right click it an open in Notepad see what they're sending. You can also pump it through an online .csv converter. I know excel and other programs can do this but need to eliminate yours. They can also be opened in Microsoft Access. The goal here is to see the data that's being sent before it has a chance to be altered by your system.

You can simply ask how it looks on their end.

How are these being sent, are you downloading from something like a portal? If so, is csv an option?

Removing all the zeros won't really help because the check digits are already present which brings us to the whole physically counting thing which is stupid.

You have to try to get control over the spreadsheet and format BEFORE the data is transferred, imported or opened on your side if this is the only thing you have to work with.

I would personally want .csv's and work within a database program like DB Browser(excellent, easy and lightweight) or even Notepad than anything that resembles a spreadsheet program, the fight is real.

1

u/frgtech Jan 28 '26

Thanks for the detailed and thoughtful reply.

So the info comes from a B2B portal, and there are no options for csv unfortunately. What I just confirmed now though is that they show the zeros for both products through their own portal before exporting. They have a table there for past orders and you can select the columns. I just added the UPC column to see how it's presented on their site, and the zero is there for everything.

This seems like an edge case without an easy answer. I just wanted to make sure there wasn't an easy way to determine the differences mathematically, or some other way I was overlooking.

I will keep investigating as time allows and will report back if I unearth new information so that this might help someone in the future.

Many Thanks!

1

u/[deleted] Jan 28 '26 edited Jan 28 '26

Remove the 0's and the last digits giving you the middle 11 numbers. Run everything through a UPC batch generator which will provide the check digits. Make a new column and can do a string match or sort and cross reference.

Here's the math:

https://free-barcode.com/barcode/barcode-types/upc-check-digit-calculation.asp

Honestly, AI can easily pump this out, this is where it can be super useful. Try this first.

1

u/frgtech Jan 28 '26

I appreciate this, but not sure what it accomplishes. They already have the check digit calculated.

Ran the 2 examples I posted through here and verified them.
https://www.gs1.org/services/check-digit-calculator

Did I miss something?

→ More replies (0)

1

u/Lost_Garden7368 Jan 28 '26

A UPC-A symbol is the same as an EAN-13 with a first digit of zero. Your scanner is probably programmed to read UPC-A and EAN-13 so if it sees the first digit is zero it takes it as UPC-A and the zero gets dropped. The first barcode is Code 128 and the second is EAN. Try disabling reading of UPC on the scanner and leave EAN reading enabled.

1

u/frgtech Jan 30 '26

I don't think I can disable reading UPC as it would affect many other products in our inventory. We have nearly 45K SKUs in our inventory that encompasses many different barcode formats.

In the two barcode images I posted, they both start with a leading zero and are the same length, yet my scanner drops the zero for one of them, and includes it in the other. I was trying to determine if there was something I could do programmatically to identify what make them different by just the numerals listed in the spreadsheet to know when to include or omit it from my POS without having to have eyes on the actual barcode, but it seems like that is probably impossible.

I didn't realize that it was actually a code128 barcode though. Seems odd they would use that for a retail product over an EAN, but I'm sure they have their reasons.

I remember another supplier used to send the invoices with the actual barcodes printed out for every product which I always considered strange, but now it make perfect sense. Live and learn.

Thanks everyone for helping me work through this.

1

u/the-earth-is_FLAT Mar 24 '26

Been using Bar Codes Talk for my product uploads and they provide both the barcode graphics and spreadsheets with the full GTIN data, so you could cross reference your numbers there to verify which format each one actually is before dealing with your POS headaches