Most VAT validation APIs only cover the EU via VIES. But if you sell SaaS globally, your B2B customers are not only in the EU — they are also UK businesses with GB VAT numbers, Australian companies with ABNs, Norwegian firms with MVA numbers, and Swiss companies with UID numbers. Building separate validation integrations for each country is expensive and hard to maintain. The TaxID API covers all of them through a single REST endpoint using the same request/response format.
Country Coverage at a Glance
| Region | Countries | Registry | Prefix |
|---|---|---|---|
| European Union | All 27 EU member states | EU VIES | 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 |
| United Kingdom | Great Britain & Northern Ireland | HMRC | GB |
| Australia | Australia | ABR (Australian Business Register) | AU |
| Norway | Norway | Brønnøysund Register Centre | NO |
| Switzerland | Switzerland | Federal Tax Administration | CH |
Note
Greece uses the prefix `EL` in VIES (not `GR`). The TaxID API handles this automatically — you can send either `EL` or `GR` and the API normalises it correctly.
Single API Call for Any Country
The endpoint format is identical regardless of country. Extract the two-letter prefix from the VAT number, pass it as the country parameter, and the API routes the request to the correct registry automatically.
const BASE = 'https://taxid.dev/api/v1';
export async function validateTaxId(taxId: string) {
// Works for EU, UK (GB), AU, NO, CH — same call for all
const country = taxId.slice(0, 2).toUpperCase();
const id = taxId.replace(/\s/g, '').toUpperCase();
const res = await fetch(`${BASE}/validate/${country}/${id}`, {
headers: { Authorization: `Bearer ${process.env.TAXID_API_KEY}` },
signal: AbortSignal.timeout(6000),
});
if (!res.ok) throw new Error(`TaxID API ${res.status}`);
return res.json();
}
// Examples — all use the same function:
// await validateTaxId('DE123456789'); // Germany → VIES
// await validateTaxId('GB123456789'); // UK → HMRC
// await validateTaxId('AU12345678901'); // Australia → ABR
// await validateTaxId('NO123456789MVA'); // Norway → Brønnøysund
// await validateTaxId('CHE123456789'); // Switzerland → UIDEU VAT Numbers (27 Countries via VIES)
All 27 EU member states are validated via the VIES system operated by the European Commission. VIES returns the company name and address from the member state's national tax authority — this data is authoritative for invoice compliance. The `service_unavailable` status occurs when a member state's VIES node is temporarily offline, which happens for some countries more frequently than others.
# Validate a German VAT number
curl -H "Authorization: Bearer $TAXID_API_KEY" \
https://taxid.dev/api/v1/validate/DE/DE123456789
# Response:
# {
# "valid": true,
# "status": "active",
# "company_name": "Example GmbH",
# "address": "Musterstraße 1, 10115 Berlin",
# "country_code": "DE",
# "cached": false,
# "request_id": "req_abc123"
# }UK VAT Numbers (HMRC)
Since Brexit, UK VAT numbers are no longer part of VIES. They are validated against HMRC's API independently. UK VAT numbers follow the format `GB` + 9 digits. Northern Ireland businesses that trade in goods within the EU may also have `XI`-prefixed numbers for intra-EU supply purposes.
// UK VAT number validation
const result = await validateTaxId('GB123456789');
// UK-specific note:
// status: 'active' = registered with HMRC and VAT-active
// status: 'inactive' = number exists but VAT registration has lapsed
// status: 'format_invalid' = not a valid GB + 9-digit format
if (result.status === 'active') {
// Apply zero-rate for UK B2B under UK VAT Act 1994 s.6
// Store company name + address for Making Tax Digital compliance
console.log(`Validated UK business: ${result.company_name}`);
}Australian ABN / GST Numbers
Australian businesses are identified by their ABN (Australian Business Number) — an 11-digit number that also serves as their GST registration identifier. Use the prefix `AU` followed by the 11-digit ABN. The API validates against the Australian Business Register (ABR), which returns the entity's registered name and ABN status.
// Australian ABN validation
const result = await validateTaxId('AU12345678901');
// Format: AU + 11 digits (no spaces, no hyphens)
if (result.status === 'active') {
// ABN is active and GST-registered
console.log(`ABN valid: ${result.company_name}`);
}Norway MVA and Switzerland UID
// Norway MVA number: NO + 9 digits + 'MVA'
const noResult = await validateTaxId('NO123456789MVA');
// Switzerland UID: CHE + 9 digits (format: CHE-xxx.xxx.xxx)
const chResult = await validateTaxId('CHE123456789');
// TaxID normalises the dashes automatically
console.log(noResult.company_name); // Norwegian company name
console.log(chResult.company_name); // Swiss company nameDetecting Country from VAT Input
For UI forms that accept VAT numbers from customers in any country, detect the country from the input and show the correct format hint.
const FORMAT_HINTS: Record<string, string> = {
DE: 'DE + 9 digits',
FR: 'FR + 2 chars + 9 digits',
GB: 'GB + 9 digits',
AU: 'AU + 11 digits (ABN)',
NO: 'NO + 9 digits + MVA',
CH: 'CHE + 9 digits',
IT: 'IT + 11 digits',
ES: 'ES + letter + 7 digits + letter',
NL: 'NL + 9 digits + B + 2 digits',
};
export function getFormatHint(input: string): string | null {
const prefix = input.slice(0, 2).toUpperCase();
return FORMAT_HINTS[prefix] ?? null;
}Related guides
Start validating EU VAT numbers
Free plan — 100 validations/month. No credit card required.