Docs/Sources/VAT Number Validator

VAT Number Validator

Check the format and check digits of an EU, UK, Swiss or Norwegian VAT number

OperationalCredits 5 per callp50 106msData Validation

Overview

A VAT number format and checksum API for checkout, supplier onboarding and invoice checks. Send a number with its country prefix, such as DE136695976, CHE-116.281.710 MWST or NO 923 609 016 MVA, and get back whether it matches that country's format and check-digit algorithm. Spaces, dots, dashes and lower case are accepted, Greece can be written EL or GR, and a number without a prefix works when you send the country.

This is an offline check of the number itself. It does not ask VIES, HMRC or any registry whether the number is registered or active, so it answers instantly and never fails because a national VAT system is down. Use it to reject typos as they are typed, then confirm registration with VIES or HMRC for the numbers that pass.

The Free plan returns the verdict, the normalised number, the country and the result of each check. Paid plans add the number type where the format reveals it (legal entity, individual, UK branch, government department), the check digits a mistyped number should have had, the algorithm used, and whether the country is in the EU and in VIES.

Live Test VAT Number Validator Source →

The tool

Once your client is connected to the VerveContext server, this appears in its tool list as VATNumberValidator. It is read-only and open-world — it fetches and never mutates anything on your side — so most clients call it without asking you to confirm.

Tool call
{
  "name": "VATNumberValidator",
  "arguments": {
    "vat": "IE6388047V"
  }
}

You do not name the tool yourself; the model picks it. Asking about IE6388047V in the terms this source covers is enough for it to reach for VATNumberValidator on its own — naming it explicitly also works, and is the way to force the call.

Connecting

One server URL covers every source in the catalog, including this one. Authorization is OAuth: the client opens a browser once, and there is no key to paste into a config file.

{
  "mcpServers": {
    "vervecontext": {
      "url": "https://api.vervecontext.com/v1/mcp"
    }
  }
}

Per-client setup — Claude, Cursor, VS Code, ChatGPT — is on the MCP setup page.

Arguments

These are the properties on the tool's inputSchema, so a well-behaved client validates them before the call is made. Premium arguments are accepted on every plan but only take effect on plans that include them.

ArgumentTypeDescription
vatRequiredstringThe VAT number with its country prefix, such as DE136695976 or CHE-116.281.710 MWST. Spaces, dots, dashes and lower case are accepted
length 0–40
countryOptionalstringTwo-letter country prefix to use when the number has none, such as DE, EL or GR, XI, CH or NO. Ignored when the number carries its own prefix, except that a mismatch is reported
length 0–2

What the model gets back

The result carries a structuredContent object matching the tool's declared outputSchema, so a client reads fields without parsing prose. status is "ok" and error is null on success; a null field means the value was not available for that input, not that the call failed.

Result
{
  "status": "ok",
  "error": null,
  "data": {
    "vatNumber": "IE6388047V",
    "isValid": true,
    "countryCode": "IE",
    "isoCountryCode": "IE",
    "countryName": "Ireland",
    "localNumber": "6388047V",
    "checks": {
      "country": true,
      "format": true,
      "checksum": true
    },
    "errors": [],
    "numberType": null,
    "expectedCheckDigits": null,
    "algorithm": "weighted MOD 23 letter",
    "isEU": true,
    "inVies": true
  }
}

Response fields

Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.

FieldTypeExampleDescription
vatNumberstringIE6388047VThe number normalised: prefix plus local number, no spaces or separators
isValidbooleantrueTrue when the format and check digits are correct for the country. Not a registration check
countryCodestringIEThe VAT country prefix, such as DE, EL for Greece, XI for Northern Ireland or CH. Null when no supported prefix was found
isoCountryCodestringIEISO 3166-1 alpha-2 code of the country (GR for EL, GB for XI); null for EU non-Union OSS numbers
countryNamestringIrelandCountry name
localNumberstring6388047VThe number without its country prefix
checksobject{…}Pass or fail for each check on its own; null where a check was not run
checks.countrybooleantrueA supported country was found, and it matches the country param when both are given
checks.formatbooleantrueThe local number has the length and letter and digit pattern the country uses
checks.checksumbooleantrueThe check digits are correct; null when the format failed or the number type has no check digits
errorsarray[]Why the number is invalid; empty when valid
numberTypePremiumobjectnullWhat the format reveals about the holder, where it does: legal entity, individual, foreign individual, branch, standard, government department, health authority, temporarily registered taxpayer or other. Null elsewhere
expectedCheckDigitsPremiumobjectnullFor a well-formed number with wrong check digits, the check digits it should have; null when valid or when more than one value could fit
algorithmPremiumstringweighted MOD 23 letterThe check-digit algorithm the country uses
isEUPremiumbooleantrueTrue for the 27 EU member states' prefixes
inViesPremiumbooleantrueTrue when registration can be confirmed with the EU's VIES service (EU member states, XI and EU OSS numbers)

Why ground on it

A model can produce something that looks like this answer from its training data, and be confidently out of date or simply wrong. This source returns the current value in a shape you can check, which is the difference between an answer you can cite and one you have to hedge.

Point an evaluation at vatNumber: it is the field most worth pinning a claim to, and it is either present and current or absent — never plausibly invented.

Failure modes

Errors come back as tool errors carrying a sentence the model can act on, not a bare status code. Error handling covers the full list.

StatusWhat it means
400 / 422The arguments did not validate. The message names the offending one.
401The OAuth session is invalid or expired — reconnect the server.
403Blocked by a key restriction or an IP allow-list. Never a bad identity.
404This source is not part of VerveContext. Check the catalog.
429Out of credits, or a brief rate limit. The message tells them apart.

A call costs 5 credits each time the tool actually runs; a model that reasons about the tool without calling it costs nothing.

Use cases

Checkout and Billing
Reject a mistyped VAT number as a business customer types it, before you issue a reverse-charge invoice.
Supplier Onboarding
Check the VAT numbers suppliers submit and flag the ones that cannot be right before they reach accounts payable.
Pre-check Before VIES
Filter out malformed numbers before calling VIES or HMRC, so the slow registry lookup only runs on numbers that can pass.
Data Cleaning
Normalise the VAT numbers in a CRM or ERP to one format and find the ones with bad check digits.

Other ways to use VAT Number Validator

Set up VAT Number Validator on VerveContext, or reach the same source a different way. Your VerveContext account and credits work on all of them — one key, one balance.

Call it as a REST APIOne HTTPS endpoint and an x-api-key header, with SDKs for Node, Python and .NET.APIVerve →Reference →
Give it to an AI agentConnect over MCP and your agent calls it as a native tool — Claude, Cursor, ChatGPT.VerveKit →Reference →
Google Sheets or ExcelA =VERVE() formula fills a column — no script, no export, recalculates in place.VerveSheets →Reference →

More in Data Validation:

Was this page helpful?