VAT number check API
Check the structure and check digit of a VAT number from any EU member state, Northern Ireland, Great Britain, Switzerland or Norway.
POST https://api.curatedapi.com/v1/calc/check/vat-number
- Version 1
- MCP tool
calc_check_vat_number - Try it in the browser
Checks a VAT identification number against its country's structure and check digit rule: all 27 EU member states, Northern Ireland (XI), Great Britain, Switzerland and Norway. This is the test to run before sending a number to VIES or putting it on an invoice: it catches typing mistakes at once and works when VIES is down. It does not say whether the number is registered.
Formula
the country's structure, then its check digit rule (for example ISO 7064 MOD 11,10 for Germany, modulus 97 for Belgium, Luhn for Italy and Sweden)
- The number is checked by arithmetic alone. Nothing is looked up, so a valid result means the number is well formed, not that the account, company or security exists.
- Whether a number is registered for VAT is answered by the EU's VIES service or the national tax office, which are not consulted.
- In Bulgaria, Czechia, Latvia and Spain a person's VAT number is their personal number; its date part is checked where it has one.
- The EU prefix (non-Union One Stop Shop numbers) is not covered.
Inputs
Send numbers as strings to keep every digit. options sets precision and rounding (see numbers and rounding).
| Input | Type | Description |
|---|---|---|
number required |
string | The VAT number, with or without its country prefix. Spaces, dots, hyphens and slashes are ignored, and lower-case letters are read as upper case. At most 64 characters. |
country |
AT | BE | BG | CY | CZ | DE | DK | EE | EL | ES | FI | FR | HR | HU | IE | IT | LT | LU | LV | MT | NL | PL | PT | RO | SE | SI | SK | XI | GB | CHE | NO | GR | CH | The country, when the number has no prefix. Greece uses EL on VAT numbers. Options: AT: Austria; BE: Belgium; BG: Bulgaria; CY: Cyprus; CZ: Czechia; DE: Germany; DK: Denmark; EE: Estonia; EL: Greece; ES: Spain; FI: Finland; FR: France; HR: Croatia; HU: Hungary; IE: Ireland; IT: Italy; LT: Lithuania; LU: Luxembourg; LV: Latvia; MT: Malta; NL: Netherlands; PL: Poland; PT: Portugal; RO: Romania; SE: Sweden; SI: Slovenia; SK: Slovakia; XI: Northern Ireland; GB: United Kingdom; CHE: Switzerland; NO: Norway; GR: Greece (same as EL); CH: Switzerland (same as CHE) |
Result
Under result in the answer, next to exactness, precision, inputs, formula, references and warnings.
| Result | Type | Description |
|---|---|---|
valid | boolean | Whether the VAT number passes every check. |
normalized | string | The number as it was checked: separators removed, letters in upper case. |
problem | string | What is wrong, when valid is false: CHARACTERS: a character that cannot appear in this kind of number; LENGTH: the wrong number of characters; COUNTRY: an unknown or unsupported country code; FORMAT: the right length but the wrong structure; CHECK_DIGIT: the check digit or check characters do not match the rest of the number. |
message | string | The result in a sentence, naming the rule that failed. |
country | string | The prefix: the ISO 3166 code, except EL for Greece, XI for Northern Ireland and CHE for Switzerland. |
country_name | string | The country's name. |
national_number | string | The number after the prefix. |
Examples
A German number
curl https://api.curatedapi.com/v1/calc/check/vat-number \
-H "Authorization: Bearer $CURATEDAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"number": "DE 136 695 976"
}'
{
"calculator": "check/vat-number@1",
"result": {
"valid": true,
"normalized": "DE136695976",
"message": "A well-formed VAT number from Germany.",
"country": "DE",
"country_name": "Germany",
"national_number": "136695976"
},
"exactness": {},
"precision": null,
"inputs": {
"number": "DE 136 695 976"
},
"formula": "the country's structure, then its check digit rule (for example ISO 7064 MOD 11,10 for Germany, modulus 97 for Belgium, Luhn for Italy and Sweden)",
"references": [
{
"title": "European Commission: VIES, VAT identification number structure by member state",
"url": "https://ec.europa.eu/taxation_customs/vies/#/faq"
},
{
"title": "Swiss Federal Statistical Office: the business identification number (UID)",
"url": "https://www.bfs.admin.ch/bfs/en/home/registers/enterprise-register/enterprise-identification.html"
},
{
"title": "Brønnøysund Register Centre: the organisation number's check digit",
"url": "https://www.brreg.no/en/about-us-2/our-registers/about-the-central-coordinating-register-for-legal-entities-ccr/about-the-organisation-number/"
}
],
"warnings": []
}
A French number with the wrong key
curl https://api.curatedapi.com/v1/calc/check/vat-number \
-H "Authorization: Bearer $CURATEDAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"number": "FR 41 954 506 077"
}'
{
"calculator": "check/vat-number@1",
"result": {
"valid": false,
"normalized": "FR41954506077",
"problem": "CHECK_DIGIT",
"message": "The two-digit key is 41, but the SIREN 954506077 gives 61.",
"country": "FR",
"country_name": "France",
"national_number": "41954506077"
},
"exactness": {},
"precision": null,
"inputs": {
"number": "FR 41 954 506 077"
},
"formula": "the country's structure, then its check digit rule (for example ISO 7064 MOD 11,10 for Germany, modulus 97 for Belgium, Luhn for Italy and Sweden)",
"references": [
{
"title": "European Commission: VIES, VAT identification number structure by member state",
"url": "https://ec.europa.eu/taxation_customs/vies/#/faq"
},
{
"title": "Swiss Federal Statistical Office: the business identification number (UID)",
"url": "https://www.bfs.admin.ch/bfs/en/home/registers/enterprise-register/enterprise-identification.html"
},
{
"title": "Brønnøysund Register Centre: the organisation number's check digit",
"url": "https://www.brreg.no/en/about-us-2/our-registers/about-the-central-coordinating-register-for-legal-entities-ccr/about-the-organisation-number/"
}
],
"warnings": []
}
No prefix, country given
curl https://api.curatedapi.com/v1/calc/check/vat-number \
-H "Authorization: Bearer $CURATEDAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"number": "0697449992",
"country": "BE"
}'
{
"calculator": "check/vat-number@1",
"result": {
"valid": true,
"normalized": "BE0697449992",
"message": "A well-formed VAT number from Belgium.",
"country": "BE",
"country_name": "Belgium",
"national_number": "0697449992"
},
"exactness": {},
"precision": null,
"inputs": {
"number": "0697449992",
"country": "BE"
},
"formula": "the country's structure, then its check digit rule (for example ISO 7064 MOD 11,10 for Germany, modulus 97 for Belgium, Luhn for Italy and Sweden)",
"references": [
{
"title": "European Commission: VIES, VAT identification number structure by member state",
"url": "https://ec.europa.eu/taxation_customs/vies/#/faq"
},
{
"title": "Swiss Federal Statistical Office: the business identification number (UID)",
"url": "https://www.bfs.admin.ch/bfs/en/home/registers/enterprise-register/enterprise-identification.html"
},
{
"title": "Brønnøysund Register Centre: the organisation number's check digit",
"url": "https://www.brreg.no/en/about-us-2/our-registers/about-the-central-coordinating-register-for-legal-entities-ccr/about-the-organisation-number/"
}
],
"warnings": []
}
References
- European Commission: VIES, VAT identification number structure by member state
- Swiss Federal Statistical Office: the business identification number (UID)
- Brønnøysund Register Centre: the organisation number's check digit
Results follow each calculator's documented rules and the sources listed. They are not financial, tax or legal advice. Check that the rules fit your case before you rely on a result. See the terms.
Errors share one format; see errors. Billing, retries and batches work the same for every endpoint.