Docs/APIs/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 ValidationStar

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 API →

Endpoint

One host, one path per API. The block below shows this call in four languages; every one of them is the same HTTP request. Making requests covers the timeouts, retries and parameter rules that apply to all of them. The SDKs wrap the same call in a typed client.

GEThttps://api.apiverve.com/v1/vatnumbervalidator
curl "https://api.apiverve.com/v1/vatnumbervalidator?vat=IE6388047V&country=DE" \
  -H "x-api-key: your_api_key_here"

Replace your_api_key_here with the key from your dashboard. When the inputs arrive as a list rather than one at a time, batch requests run up to 200 of them through this same API in a single call.

Authentication

Send your key in the x-api-key header. That is the only auth step — there is no token exchange and no per-endpoint scope to configure. Authentication covers creating, rotating and revoking keys.

401 is the only auth verdict

A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.

Parameters

Sent in the query string. Premium parameters are accepted on every plan but only take effect on plans that include them.

ParameterTypeDescription
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

Response

Every API returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape. Response format covers the envelope, the other output formats and how premium fields are withheld.

Sample response
{
  "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
vatNumberstring"IE6388047V"The 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
countryCodestring"IE"The VAT country prefix, such as DE, EL for Greece, XI for Northern Ireland or CH. Null when no supported prefix was found
isoCountryCodestring"IE"ISO 3166-1 alpha-2 code of the country (GR for EL, GB for XI); null for EU non-Union OSS numbers
countryNamestring"Ireland"Country name
localNumberstring"6388047V"The number without its country prefix
checksobject{...}Pass or fail for each check on its own; null where a check was not run
countrybooleantrueA supported country was found, and it matches the country param when both are given
formatbooleantrueThe local number has the length and letter and digit pattern the country uses
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
algorithmPremiumstring"weighted MOD 23 letter"The 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)

Errors

Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change. Error handling covers the full status list and which of them are worth retrying.

StatusMeaningWhat to do
400Input was rejectedRead error; it names the parameter.
401Key missing or invalidCheck the header name and the key value.
403Key valid, but not permittedA key restriction or IP allow-list; see key scoping.
429Rate limited, or out of creditsRead error to tell them apart; see rate limits.

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 APIVerve, or reach the same source a different way. Your APIVerve account and credits work on all of them — one key, one balance.

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 →
Ground an agent on itA cited, machine-checkable fact your model can't produce on its own.VerveContext →Reference →

More in Data Validation:

Was this page helpful?