How to convert ean barcode to ISBN 10

bar code ean to isbn 10 converter

Here is how to convert EAN to readable and useful ISBN 10 code.

  1. remove the first 3 digit 978 that represents books, remove the last digit which is a check number, you have now a 9 digits code which represent the isbn but you will need the checksum digit to be complete
  2. to do the checksum: take every digit of this uncomplete isbn code and mulitply every one by is oder (the first by 1, the second by 2, … the last one by 9)
  3. sum all the results together
  4. calculate the modulo modulus (thanks Ian) 11 of the sum to obtain the checksum digit
  5. You have the checksum digit. If it’s a 10, then consider writing a ‘X’ instead of 10 (thanks to John & Froohoo)

Now put this digit on the right of the 9 others and you obtain the ISBN 10 code.

This is part of my web library project to automate the book scanning.

http://code.sbw.be/php/ean-bar-code-2-isbn-converter.php

9 comments to How to convert ean barcode to ISBN 10

  • Ian

    Thanks Sébastien!

    This is just what I was looking for.

    Just in case anyone is confused (I was slightly), “modulo” is Modulus. The “mod” operator in computer languages simply gives you the remainder. For example,

    17 mod 3 = 2

    Or in the above case, MOD(130,11) = 9.

  • Thanks! Here’s quick PHP function I was able to put together with the help from this great article:

    
    //------ 10/18/2006 -------
    // Converts an ISBN to EAN
    // Credit: http://blog.sbw.be/2006/07/29/how-to-convert-ean-bar-code-to-isbn-10/
    //-------------------------
    
    function ean_to_isbn($ean){
           $strip_ean = substr($ean, 3, 9); // strips first three digits and leaves 9
           $count = strlen($strip_ean); // counts sting len
           $m = 1; // used as number to multiple by
           for($x=0; $x< $count; $x++)
           {
                   $temp_ean = ($strip_ean{$x} * $m) + $temp_ean;
                   $m++;
           }
           $check = $temp_ean % 11;
           if($check == 10){$check = "X";} // if last number is 10, replace with an "X"
           return $strip_ean.$check;
    }
    
  • Crap. Sorry that didn’t display correctly. Probally due to the tags being striped or something similar.

    Sébastien if you want the PHP function to this to add to the site, just contact me using the email address I submited under. I don’t want any credit – just want to help.

    Thanks,

    John

  • Zokszo

    Hey Guys,

    Thanks for the advice and the method of converting.

    Funny that so many people seems to be working on the same book scanning project like us. :-)

    Zokszo

  • Froohoo

    For anyone that finds this, don’t forget to check your checksum to see if it has a value of ’10′. If this is the case, you replace the checksum with the roman numeral for 10: X.

  • Sébastien if you want the PHP function to this to add to the site, just contact me using the email address I submited under. I don’t want any credit – just want to help.

  • dan

    hi ,i need u help or any guide, i am doing some application using barcode reader to read certain numbers to switching mode. example 0 to 1000 barcode reader switch to a location & 1001 to 2000 switch to b location and so on ,cheers

  • This doesn’t work for me. This book is so old there is no ISBN on it. If I use the formula you gave, I only have 8 digits left. Any suggestions? 0 8314800599 1

  • Hi Jenny,
    With your EAN I’have no idea, however if you have the book name + references, we can try to find out which type of barcode this is.
    Maybe it’s an UPC(-B/C/D) barcode (american bar code before EAN)?

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*