ISBN-13 check digit
The twelve digits 978030640615 get the check digit 7, giving the full ISBN-13 code 9780306406157. Finish a book number before printing a barcode, or check a thirteen-digit ISBN from a catalog or partner file before it reaches a bookstore system. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Number
- 978030640615
- Calculation mode
- Compute
- Input
- 978030640615
- Check digit
- 7
- With check
- 9780306406157
Modern books and many media products are identified with a thirteen-digit International Standard Book Number: ISBN-13. The first three digits are a GS1 bookland prefix (typically 978 or 979), the middle digits encode registration group, registrant, and publication, and the final digit is a check digit that catches single-digit typing and scanning errors before the code reaches a catalog, bookstore system, or marketplace listing.
What the thirteen digits of an ISBN say
An ISBN-13 identifies a book edition, and many other media products, with thirteen digits. The first three are the GS1 bookland prefix, almost always 978 or 979, which marks the number as a book. The middle digits encode the registration group, the registrant or publisher, and the publication itself; their lengths vary with the agency that assigned them. The last digit is the check digit. Structurally the number is an EAN-13, the same thirteen-digit barcode used on retail packaging, so the same rule protects both from a single mistyped or misread digit before it reaches a catalog, a bookstore system or a marketplace listing.
Working out the check digit, and what it cannot tell you
Take the twelve digits before the check digit and walk them from left to right, multiplying the first by one, the second by three and so on, alternating. Add the products, take ten minus the remainder after dividing by ten, and turn a result of ten into zero. For 978030640615 that gives 7, so the complete ISBN is 9780306406157. Codes must be typed as digits only: letters, hyphens and the wrong length are refused rather than cleaned up silently. A matching check digit means the code is well formed, not that an ISBN agency has registered it, because no agency is consulted.
How the ISBN-13 check digit is calculated
An ISBN-13 is always thirteen digits and is structurally identical to an EAN-13 / GTIN-13 product barcode used on retail packaging. The thirteenth digit is the check digit. Equivalently, the full thirteen-digit string including the check digit must have a weighted sum that is a multiple of ten under the same left-to-right weights.
This is the same family of mod-10 rules used across GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13 / ISBN-13), and GTIN-14; only the fixed thirteen-digit bookland form and the 978/979 prefix make ISBN-13 specific for searchers. The algorithm is deterministic and local: no ISBN agency lookup, no network call, and no clock.
What you can do with it
Audit ISBN-13 columns in catalog and ONIX exports
Batch-validate every thirteen-digit ISBN in a PIM, library load, or partner CSV and quarantine rows whose check digit no longer matches the recomputed expected value.
FAQ
What is an ISBN-13 check digit?
It is the thirteenth digit of an ISBN-13 barcode, computed with a mod-10 weighted sum (alternating weights 1 and 3 from the left) so single-digit typing and scanning errors are usually caught before the code is stored or printed.
What happens with wrong length, letters, or hyphens?
Failed validation tasks are not billed. Strip hyphens before sending.
Is the ISBN-13 check digit tool free?
The browser tool is free and runs locally.
How is the ISBN-13 check digit calculated?
Take the first twelve digits from left to right, multiply them alternately by 1 and 3, and add the products. The check digit is ten minus the remainder after dividing by ten; if that gives ten, the check digit is 0.
Is an ISBN-13 the same as an EAN-13 barcode?
Structurally, yes. An ISBN-13 is a thirteen-digit EAN-13 number that starts with the bookland prefix 978 or 979 and follows the same check-digit rule as retail product barcodes.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/enc/isbn13 \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"number":"978030640615"}'const res = await fetch("https://api.kit.forhosting.com/enc/isbn13", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"number": "978030640615"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/enc/isbn13",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"number": "978030640615"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/enc/isbn13", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"number":"978030640615"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"number":"978030640615"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/enc/isbn13", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"number": "978030640615"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "enc.isbn13",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
This capability implements the standard ISBN-13 mod-10 rule on a twelve-digit payload—weights alternating one and three from the left—and either returns the check digit plus the completed thirteen-digit barcode, or validates a full thirteen-digit string with an explicit valid flag and the expected digit. Non-numeric input and wrong lengths fail with invalid_input instead of silent stripping, so you never store a half-cleaned ISBN. The same pure arithmetic runs free in the browser and at the published API price for automation pipelines.
How the ISBN-13 check digit is calculated
The first twelve digits form the book number payload: a three-digit GS1 prefix (almost always 978 or 979 for books), a registration-group element, a registrant (publisher) element, and a publication element whose lengths vary by agency rules. To compute it, walk the twelve payload digits from left to right with 1-based positions: multiply each odd-position digit by one and each even-position digit by three, add those products, then take the check digit as ten minus that sum modulo ten, modulo ten again so a zero remainder yields check digit zero. Compared with multi-symbology barcode validators, the search intent here is narrow: people who need an ISBN-13 check digit calculator for twelve-digit payloads, not a general UPC-or-case GTIN checker.
Input contract, modes, and error behaviour
Send a number field that contains only characters zero through nine. Wrong length is an explicit error that names the mode and the length you sent—twelve for compute, thirteen for validate—so client forms can show “need twelve digits” without guessing. Empty strings, missing number, and invalid mode values fail before any weighted sum runs and are not billed. Prefer compute when you mint or complete book numbers from a twelve-digit body; prefer validate when you gate a catalog import, POS scan, or marketplace listing on a full thirteen-digit ISBN-13 barcode. Spaces, hyphens, letters, and decimal points are rejected as non-numeric input with invalid_input so a silently stripped value never reaches storage—paste 978-0-306-40615 without the check digit and you must strip hyphens client-side first, or send the pure digit form. Mode compute is the default: the engine requires exactly twelve digits, returns check_digit as a one-character string, and returns with_check as the thirteen-digit ISBN-13 you can print on a barcode or persist in a catalog. Mode validate requires exactly thirteen digits; the response reports valid true when the trailing digit matches the recomputed expected_check_digit, and always includes payload (the first twelve digits), check_digit, expected_check_digit, and length thirteen. Alias keys such as digits, isbn, and code are accepted for the same payload field so integrations that already speak “isbn” do not need a rename. Because the path is pure parse with no clock, random source, or network, the same JSON body always yields the same JSON result on the free browser tool and on the API at $0.002 per successful request.
Where ISBN-13 check digits fit real workflows
Publishers and catalog teams receive twelve-digit internal book numbers—prefix plus registration group, registrant, and title—and must append the official ISBN-13 check digit before printing EAN-13 barcodes on covers, jackets, or stickers. Bookstore POS and receiving apps validate thirteen-digit codes at the counter so a single transposition does not create a phantom title and a stock mismatch. Library and aggregator data-quality jobs walk every ISBN-13 column in a MARC, ONIX, or CSV export, call validate mode, and quarantine rows where valid is false—catching both human edits and off-by-one bugs in generators that still emit legacy ISBN-10 without proper conversion. E-commerce and marketplace onboarding forms can recompute expected_check_digit and show a friendly correction when a seller pastes an ISBN with a mistyped last digit. Do not treat a passing ISBN-13 check as proof of title ownership, agency registration, or correct hyphenation groups; it only proves the mod-10 digit is consistent with the twelve-digit payload under the standard ISBN-13 weights.
Integration use cases
Complete a 12-digit book number for cover barcodes
Call compute mode with the twelve-digit payload, store with_check, and feed the thirteen-digit ISBN-13 into your EAN-13 barcode printer or catalog record.
Validate scanned or typed ISBN-13 at entry
When a scanner or form submits thirteen digits, call validate mode and block lookup when valid is false, showing expected_check_digit to help correct a single mistype.
Technical questions
How do I compute an ISBN-13 check digit with this API?
POST with number set to exactly twelve digits and mode compute (or omit mode). The response includes check_digit and with_check (the full thirteen-digit ISBN-13).
How do I validate a full thirteen-digit ISBN-13?
POST with the thirteen-digit string and mode validate. The response includes valid, check_digit, expected_check_digit, and payload (digits without the last one).