6

I have an 8 digit EAN code which I would like to convert to an EAN-13 code.
Do you know of any algorithm on how to calculate this?

Or is it simply adding five zeros to the beginning of the EAN-8?
E.g. EAN-8(1234 5678) becomes EAN-13(00000 1234 5678)?

Charles
  • 50,943
  • 13
  • 104
  • 142
jrn
  • 2,640
  • 4
  • 29
  • 51

2 Answers2

15

Adding five leading zeros to a valid EAN-8 will give you a valid EAN-13.

EAN-8 is just another name for GTIN-8, and EAN-13 is another name for GTIN-13. You can always convert shorter GTINs to longer GTINs by left-padding them with zeros, see http://en.wikipedia.org/wiki/Global_Trade_Item_Number#Format.

mjfroehlich
  • 1,217
  • 10
  • 4
  • This is completely untrue. The GTIN-8 represented by an EAN-8 symbol is an entirely separate number system from the GTIN-13 represented by EAN-13. – Terry Burton Oct 21 '16 at 08:10
  • This answer is correct, no idea where Terry is getting his information. I have tried adding leading zeroes to EAN-8 samples and verifying as EAN-13 - no need to recalculate the check digit. – Don Mar 20 '19 at 11:58
  • Coca-Cola Classic can barcode is: 04963406. But EAN-13 is 049000000443. How does your method work? – MonOve Sep 16 '19 at 13:52
  • 1
    @MonOve those are two separate barcodes for the "same" product, or possibly different versions of the "same" product. When I search 04963406 is a coke can, 049000000443 is a coke bottle. – Don May 19 '20 at 15:05
  • The EAN13 thus generated can both be valid and not lead to the same product as the EAN8. This answer is right in that you do get a valid EAN13. Maybe Terry is also right that if you scan it you wouldn't get to the right product. The product it gets me too I can't test but this answer did save my ass nervertheless. – user2870968 Mar 12 '21 at 11:50
3

EAN-8 is a short version of EAN-13, composed by 7 digits and 1 check digit.

There is no conversion available between EAN-8 and EAN-13 sorry :(

Dark
  • 505
  • 4
  • 12