ISBN / UPC / EAN Validator & Generator
Validate or generate ISBN-10, ISBN-13, UPC-A, EAN-8 and EAN-13 codes with an inline SVG barcode.
Overview
The ISBN / UPC / EAN Validator and Generator covers the five most common product and book barcodes: ISBN-10, ISBN-13, UPC-A, EAN-8 and EAN-13. Paste a code to validate the check digit, or paste the digits without the check digit to have it computed. The tool also renders an inline SVG barcode you can copy or download for proof-of-concept use.
It is used by publishers proofreading a book record before sending it to a distributor, retailers reconciling stock against an EDI feed and developers building a checkout that validates user-typed product codes. Long-tail queries it covers include "ISBN-13 check digit calculator", "UPC-A barcode generator online" and "EAN-13 validation algorithm".
How it works
Every modern product barcode uses a weighted-sum check digit. UPC-A and EAN-13 weight digits alternately by 1 and 3 from the right, then take the result mod 10 and subtract from 10. EAN-8 uses the same scheme over 7 digits. ISBN-13 uses the EAN-13 algorithm because every ISBN-13 starts with the "Bookland" prefix 978 or 979 and is a valid EAN.
ISBN-10 is older and uses a different algorithm: multiply each of the first 9 digits by 10, 9, 8, ... 2 and find the check digit (0-9 or X for 10) that makes the total a multiple of 11. The validator runs all five algorithms against the input and reports which one matches; the generator computes the check digit on demand.
Examples
9780131103627 → Valid ISBN-13 / EAN-13
036000291452 → Valid UPC-A
73513537 → Valid EAN-8
013110362_ → Generate ISBN-10 check digit → 013110362X
FAQ
What's the difference between ISBN-10 and ISBN-13?
ISBN-10 is the older standard, retired for new books in 2007. ISBN-13 is identical to an EAN-13 barcode starting with 978 or 979, which let publishers and retailers use the same scanning infrastructure as grocery products.
Why does ISBN-10 sometimes end with X?
X represents the value 10 in the modulo-11 check digit calculation. About one ISBN-10 in eleven has an X check digit.
Are the generated barcodes scannable?
The SVG output is geometrically correct and most barcode scanners will read it on screen or when printed at a sufficient size. For production use, generate at a higher DPI and check the quiet zones (whitespace around the bars).
Is UPC-A the same as EAN-13?
Almost. UPC-A is 12 digits; EAN-13 is 13. A UPC-A code is exactly the same as an EAN-13 with a leading zero. Scanners read both interchangeably.
Can EAN-8 be used for any product?
EAN-8 is reserved for small packages where a full EAN-13 wouldn't fit. The code is allocated by GS1 specifically and isn't a shortened form of any particular EAN-13.