Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert EAN-8 to EAN-13

Tags:

barcode

ean-13

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)?

like image 440
jrn Avatar asked Jun 03 '12 20:06

jrn


2 Answers

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.

like image 114
mjfroehlich Avatar answered Nov 11 '22 14:11

mjfroehlich


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 :(

like image 39
Dark Avatar answered Nov 11 '22 15:11

Dark