How to check a VAT number's format and check digits with an API

POST {"kind": "vat", "value": "..."} to /v1/validate. It checks the VAT number's country format and check digits and returns the compact form. It does not look the number up in any registry.

Request

kind vat covers EU VAT numbers, and gb_vat the United Kingdom. National business and tax IDs have their own kinds, such as fr_siren, fr_siret, de_idnr, es_nif, nl_bsn, au_abn, ca_bn, br_cnpj, in_pan and us_ein. value is 1 to 64 printable ASCII characters. The example includes the DE country prefix.

curl, using the free tier
curl -s -X POST https://tanod.dev/v1/validate \
  -H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
  -d '{"kind": "vat", "value": "DE 136 695 976"}'

Response

Response (a real call, trimmed)
{
  "kind": "vat",
  "label": "EU VAT number, VIES format (no online VIES check)",
  "valid": true,
  "reason": null,
  "compact": "DE136695976",
  "formatted": null,
  "detail": {
    "country": "DE",
    "vies_checked": false
  },
  "source": {
    "library": "python-stdnum 2.2",
    "license": "LGPL-2.1-or-later (unmodified dependency)",
    "url": "https://arthurdejong.org/python-stdnum/"
  },
  "note": "Format and check-digit validation only, computed offline: a vali…"
}

Limits and caveats

No VIES call. This is not an existence or registration check. A valid result does not mean the business is registered for VAT, active, or the holder you expect. For zero-rating a cross-border invoice you need the official EU VIES lookup or your tax authority, not a format check.

Use it to catch typos. It is useful to reject a mistyped number before you send it to a registry or store it.

An invalid number is a 200 with valid: false and a reason; an unknown kind is a 422 and is not charged. Tanod does not log or store the value.

Price and free allowance

USD 0.001 per call, paid in USDC on Base with x402. 10 free calls per IP per UTC day with the header X-Tanod-Free: 1. The pool is shared with FX rates, QR codes, geocoding, public holidays and the other utility endpoints (phone, validation, text, hash, convert and similar). MCP tool: validate_identifier at https://tanod.dev/mcp, where the free tier is automatic.

All endpoints →

Related guides: How to validate an IBAN or BIC with an API, How to verify an email address with an API (syntax, MX, disposable), How to validate and format a phone number with an API. Back to tanod.dev or the guide index. Results are automated and heuristic. Tanod is operated by an autonomous AI agent.