What Is an ISBN? ISBN-10 vs ISBN-13 and How the Check Digit Works

A practical guide to the International Standard Book Number: what each part means, why ISBN-10 became ISBN-13, and how to calculate and validate check digits step by step.

By The Books API TeamPublished 8 min read

Pick up almost any printed book and turn it over. Above or below the barcode you will find a string of digits that starts with "ISBN". It looks like a random serial number, but every part of it carries meaning, and the last digit is a small piece of arithmetic that protects the whole thing against typos.

In this guide we will cover what an ISBN is, who issues it, how it is structured, why the world moved from ISBN-10 to ISBN-13, and exactly how the check digit is calculated. If you write software that touches book data, the last sections include code you can drop into your project.

What is an ISBN?

An ISBN (International Standard Book Number) is a unique identifier for a specific edition and format of a book. It is defined by the international standard ISO 2108 and coordinated worldwide by the International ISBN Agency, which delegates the actual assignment of numbers to national or regional agencies.

The key word is edition. An ISBN does not identify a story or a "work" in the abstract. The hardcover and the paperback of the same novel get different ISBNs. So do the ebook and the audiobook, a revised second edition, and a translation. That is exactly what makes the ISBN useful in commerce: a bookseller ordering stock needs to know which physical product will arrive.

In short: one ISBN = one edition in one format from one publisher. A single novel can easily have dozens of ISBNs across its lifetime.

A short history

The ISBN grew out of the 9-digit Standard Book Numbering (SBN) scheme used by British booksellers in the 1960s. The 10-digit ISBN was adopted as ISO 2108 in 1970, and an old SBN can be turned into an ISBN-10 by adding a leading zero.

On 1 January 2007 the standard switched to 13 digits. Since then, every newly assigned ISBN is an ISBN-13, and ISBN-10s are only a legacy representation of older numbers.

Who issues ISBNs?

ISBNs are not issued by a single global office. Each country or language area has a registration agency. In the United States that is Bowker; in the United Kingdom and Ireland it is Nielsen; in Spain, the Agencia del ISBN. Some agencies charge for numbers, others provide them free to local publishers.

Publishers buy or receive a block of numbers and assign them to their own titles. Self-published authors can get ISBNs from their national agency too. Some publishing platforms offer free ISBNs, but in that case the platform is recorded as the publisher of record, which matters if you later want to move the edition elsewhere.

Anatomy of an ISBN-13

An ISBN-13 has five elements, usually separated by hyphens or spaces when printed:

ElementExampleMeaning
Prefix (GS1)978Identifies the number as a book in the global barcode system. Currently 978 or 979.
Registration group0A country, region or language area (0 and 1 are English-speaking areas).
Registrant306The publisher or imprint.
Publication40615The specific edition and format.
Check digit7Calculated from the other twelve digits.

So the example above is written 978-0-306-40615-7.

The registration group, registrant and publication elements have variable lengths. A large publisher gets a short registrant code and therefore room for many publication numbers; a small publisher gets a long registrant code and only a handful of numbers. This is why you cannot reliably insert hyphens yourself just by counting digits: you need the range tables published by the International ISBN Agency. For storage and lookups, the safest approach is to strip all hyphens and spaces and keep the plain 13 digits.

ISBN-10 vs ISBN-13

The move to 13 digits had two motivations:

  1. Alignment with retail barcodes. Books were already printed with EAN-13 barcodes. The "Bookland" prefix 978 was placed in front of the old 9 core digits, and a new check digit was calculated. The ISBN-13 is the EAN-13 barcode number.
  2. Capacity. Some registration groups were running out of numbers. Adding the 979 prefix opened a whole new range.

Every ISBN-10 has an equivalent ISBN-13 that starts with 978. The reverse is not true: an ISBN-13 beginning with 979 has no ISBN-10 equivalent. Groups such as 979-10 (France), 979-11 (South Korea) and 979-8 (United States) only exist in 13-digit form.

ISBN-10ISBN-13
Length10 characters13 digits
Used for new booksUntil end of 2006Since 1 January 2007
Check digitModulus 11, may be "X"Modulus 10, always 0-9
Matches the barcodeNoYes (EAN-13)
Covers 979 rangeNoYes

How the ISBN-13 check digit works

The ISBN-13 check digit uses the same algorithm as every EAN-13 barcode.

  1. Take the first 12 digits.
  2. Multiply them alternately by 1 and 3, starting with 1.
  3. Add up the results.
  4. The check digit is (10 − (sum mod 10)) mod 10.

Let's work through 978-0-306-40615-?:

Digit978030640615
Weight131313131313
Product9218030612018115

The products sum to 93. 93 mod 10 = 3, and 10 − 3 = 7. The check digit is 7, giving 978-0-306-40615-7.

To validate a full ISBN-13, include the 13th digit with weight 1 and check that the total is divisible by 10 (93 + 7 = 100).

How the ISBN-10 check digit works

ISBN-10 uses a stronger modulus-11 scheme:

  1. Take the first 9 digits.
  2. Multiply them by the weights 10, 9, 8, 7, 6, 5, 4, 3, 2.
  3. Add up the results.
  4. The check digit is (11 − (sum mod 11)) mod 11. If the result is 10, the check digit is written as X.

For 0-306-40615-?:

Digit030640615
Weight1098765432
Product02704224024310

The sum is 130. 130 mod 11 = 9, and 11 − 9 = 2. The full ISBN-10 is 0-306-40615-2.

Why modulus 11? Because 11 is prime, the ISBN-10 check catches every single-digit error and every transposition of two adjacent digits. The ISBN-13 scheme catches all single-digit errors but misses some adjacent transpositions (for example, swapping two neighbouring digits that differ by 5). That trade-off was accepted for compatibility with retail barcodes.

Converting between ISBN-10 and ISBN-13

ISBN-10 → ISBN-13: drop the old check digit, prefix "978", recalculate the check digit with the modulus-10 method.

0306406152 → 978030640615 → check digit 7 → 9780306406157

ISBN-13 → ISBN-10: only possible if the number starts with 978. Drop "978" and the old check digit, then recalculate with the modulus-11 method.

Code: validate and convert ISBNs

Here is a compact TypeScript implementation you can use in a form validator or an import pipeline:

export function normalizeIsbn(input: string): string {
  return input.replace(/[^0-9Xx]/g, "").toUpperCase();
}

export function isbn13CheckDigit(first12: string): number {
  let sum = 0;
  for (let i = 0; i < 12; i++) sum += Number(first12[i]) * (i % 2 === 0 ? 1 : 3);
  return (10 - (sum % 10)) % 10;
}

export function isbn10CheckDigit(first9: string): string {
  let sum = 0;
  for (let i = 0; i < 9; i++) sum += Number(first9[i]) * (10 - i);
  const check = (11 - (sum % 11)) % 11;
  return check === 10 ? "X" : String(check);
}

export function isValidIsbn(input: string): boolean {
  const isbn = normalizeIsbn(input);
  if (/^\d{13}$/.test(isbn)) return isbn13CheckDigit(isbn) === Number(isbn[12]);
  if (/^\d{9}[\dX]$/.test(isbn)) return isbn10CheckDigit(isbn) === isbn[9];
  return false;
}

export function toIsbn13(input: string): string | null {
  const isbn = normalizeIsbn(input);
  if (/^\d{13}$/.test(isbn)) return isValidIsbn(isbn) ? isbn : null;
  if (!isValidIsbn(isbn)) return null;
  const core = "978" + isbn.slice(0, 9);
  return core + isbn13CheckDigit(core);
}

A few practical tips when you store ISBNs:

  • Store ISBN-13 as your canonical key. Convert ISBN-10 input on the way in; keep the ISBN-10 only for display if you need it.
  • Store it as text, not as an integer. ISBN-10s can start with zero and can end in X.
  • A valid checksum is not proof of existence. It only proves the number is well formed. To know whether a book was actually published with that number, you need to look it up in a catalogue.

Common ISBN misconceptions

"An ISBN identifies a book." It identifies a product: one edition in one format. If you want to group all editions of a title together, you need a "work" identifier on top of ISBNs (more on that in our article on ISBN vs ASIN vs EAN vs LCCN and OCLC).

"ISBNs are never reused." That is the rule, but errors happen: publishers occasionally assign the same number to two different titles, or print an ISBN with a wrong check digit. Robust systems tolerate this instead of crashing.

"Every book has an ISBN." Many do not: books printed before the 1970s, some private or very small print runs, and many government publications. Ebooks sold only through one platform often use the platform's own identifier instead.

"Hyphens are part of the number." They are only for readability. "978-0-306-40615-7", "978 0 306 40615 7" and "9780306406157" are the same ISBN.

Final thoughts

The ISBN is one of the quiet successes of global standardisation: a compact number that publishers, distributors, libraries and retailers all over the world agree on. Understanding its structure helps you avoid the classic bugs, such as numeric columns that eat leading zeros, missing X check digits, or treating two editions as the same book.

If you need to turn an ISBN into a title, authors, publisher and cover, you can try a lookup with The Books API: a single request to GET /v1/books/{isbn} accepts both ISBN-10 and ISBN-13 and returns structured metadata with the licence information that applies to the record.

The call and the fields it returns are written up in the API documentation. The plans that include that lookup are on the pricing page.

Tagsisbnisbn-13isbn-10check digitidentifiers

Back to blog