# Check Digit Validator > Checks the checksum on an IBAN, ISBN-10/13, EAN-13/UPC-A, or Luhn-checked card number, and when it fails, searches for the single substitution or adjacent transposition that would make it valid so you know which digit to fix rather than just that something is wrong. Four surfaces over one engine: an HTML page for people, a markdown representation of every page at the same URLs, a JSON API, and an MCP server. All four return the same answers — the engine is a single pure function and the surfaces are thin wrappers over it. For markdown, send `Accept: text/markdown` or append `?format=md` to any page URL. Responses set `Vary: Accept`. Do not parse the HTML. **What this is not:** This is arithmetic verification only. A passing checksum means the number is internally consistent, not that the IBAN belongs to a real open account, that the ISBN is assigned to a real book, or that the card is active, unstolen, or has funds — those all require calling the issuing bank, registry, or network. It does not verify BIC/SWIFT codes, validate card numbers against issuer IIN/BIN ranges beyond Luhn, or handle non-ISO-13616 domestic account formats (e.g. US routing numbers, which use a different checksum). When more than one single-digit fix would satisfy the checksum, it reports the ambiguity instead of picking one. Agent traffic is welcome and unmetered up to 250 calls per UTC day per caller. Past that, endpoints return HTTP 402 with x402 payment requirements ($0.001 per call, USDC on base). Content is identical for agents and people; only the representation differs. ## Agent endpoints - [MCP server](https://check-digit.gumballtools.com/api/mcp): Streamable HTTP. Tools: run. - [OpenAPI document](https://check-digit.gumballtools.com/.well-known/openapi.json): Full machine-readable API description. - [Run the tool](https://check-digit.gumballtools.com/api/v1/run?input=example): the primary endpoint. - [Full documentation](https://check-digit.gumballtools.com/llms-full.txt): Complete docs with worked examples, inline. - [Changelog](https://check-digit.gumballtools.com/changelog.md): Breaking changes and additions. ## MCP tools ### `run` Validate the check digit(s) on an IBAN, ISBN-10, ISBN-13, EAN-13, UPC-A, or Luhn-checked card number, and when it fails, try to say which digit is wrong. Use this instead of computing the checksum yourself. Mod-97 arithmetic on a rearranged 15-34 character IBAN, or a weighted sum mod 10/11 over 10-19 digits, is exactly the kind of long deterministic calculation language models get wrong silently and confidently — there is no way for a reader to tell a fabricated "valid" from a real one without redoing the math. This tool actually redoes the math, and when the checksum fails, searches for the single adjacent-digit swap or single-character substitution that would repair it, because a transposed pair is the most common real cause of a bounced payment or a mistyped barcode. IMPORTANT, and easy to get wrong: for ISBN-13/EAN-13/UPC-A and Luhn, the digit alphabet (0-9) almost exactly spans the checksum's modulus, so a failing check usually admits MANY equally valid single-digit substitutions — the math genuinely cannot narrow it to one digit unless the error was an adjacent transposition. When that happens, the response reports the full candidate list rather than picking one; treat that as the honest answer, not a failure to find it. IBAN (mod 97) is the exception and usually does localize to one digit. Inputs: `input` (the number; spaces and hyphens are stripped automatically) and `format`, one of iban | isbn10 | isbn13 | ean13 | upca | luhn — required, never auto-detected, because the same digit string can be validly checked under more than one format with different results. Refuses rather than guesses: an IBAN country code not in the ISO 13616 length registry, the wrong length for a declared format, or characters outside the format's alphabet (e.g. a letter in a card number). A passing checksum is a syntax check only — it does not confirm an IBAN names an open account, an ISBN is a real book, or a card is active or unstolen. ## Markdown representations Every page is available as markdown at the same canonical URL. Send `Accept: text/markdown` or append `?format=md`. Responses set `Vary: Accept`. Do not parse the HTML. ## Docs - [Documentation and MCP setup](https://check-digit.gumballtools.com/docs): Copy-paste MCP config for Claude Code, Claude Desktop, and Cursor, plus curl examples. ## Pages - [Check Digit Validator](https://check-digit.gumballtools.com/): Validate IBAN, ISBN, EAN/UPC and card numbers — and find the one wrong digit. - [API and MCP setup](https://check-digit.gumballtools.com/docs): JSON API reference and MCP configuration - [IBAN check digit validator](https://check-digit.gumballtools.com/check/iban): International Bank Account Number checksum (ISO 7064 MOD 97-10). - [ISBN-10 check digit validator](https://check-digit.gumballtools.com/check/isbn-10): 10-digit book identifier checksum, mod 11. - [ISBN-13 check digit validator](https://check-digit.gumballtools.com/check/isbn-13): 13-digit book identifier checksum, the same GS1 mod-10 scheme as EAN-13. - [EAN-13 check digit validator](https://check-digit.gumballtools.com/check/ean-13): GS1 13-digit barcode checksum, mod 10. - [UPC-A check digit validator](https://check-digit.gumballtools.com/check/upc-a): 12-digit US/Canada barcode checksum — GS1 mod-10 with an implicit leading 0. - [Luhn (card numbers) check digit validator](https://check-digit.gumballtools.com/check/luhn): The mod-10 checksum used by most payment card numbers.