Luhn check digit

$0.003 per call · failed calls are never charged · no account or API key needed

Check whether a number passes the Luhn (mod 10) algorithm used by card numbers, IMEI numbers and many IDs, and compute the check digit to append. Only the format is checked; nothing is looked up. Use to catch typos in card or ID numbers.

Run it free (25 free calls) Buy credits by card (from $5) Example result (JSON)

Inputs

NameTypeDescription
number (required)stringDigits, spaces and hyphens allowed

Request

Over HTTP, with a card key from /credits:

curl -H "Authorization: Bearer adt_…" "https://agent-data-tools.revmesh2074.workers.dev/validate/luhn?number=79927398713"

Or one of your 25 free calls, no key:

curl "https://agent-data-tools.revmesh2074.workers.dev/validate/luhn?number=79927398713&trial=1"

Without a key, the same URL answers 402 Payment Required with x402 and MPP terms, so an agent with a wallet pays per call in USDC (Base, Polygon, Arbitrum, Monad, World Chain or Tempo) and retries.

Example result

{
  "digits": "79927398713",
  "valid": true,
  "checkDigitForPrefix": 3
}

From an AI agent (MCP)

Add the MCP server to Claude, Cursor or any MCP client. This tool is validate_luhn, and the first 25 successful calls are free:

https://agent-data-tools.revmesh2074.workers.dev/mcp

Related tools