Guide9 min readAlberto García

Tax ID Validation API: Global Coverage Beyond EU VIES

One API, 31 countries. TaxID validates VAT numbers across EU, UK, AU, NO, and CH — each routed to the right national registry — so you don't need separate integrations per country.

vatapiglobalguideukaustralia

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

RegionCountriesRegistryPrefix
European UnionAll 27 EU member statesEU VIESAT, 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 KingdomGreat Britain & Northern IrelandHMRCGB
AustraliaAustraliaABR (Australian Business Register)AU
NorwayNorwayBrønnøysund Register CentreNO
SwitzerlandSwitzerlandFederal Tax AdministrationCH

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.

typescriptlib/validate-global.ts
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 → UID

EU 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.

bash
# 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.

typescriptexamples/uk-validation.ts
// 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.

typescriptexamples/au-validation.ts
// 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

typescriptexamples/no-ch-validation.ts
// 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 name

Detecting 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.

typescriptlib/country-hints.ts
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;
}

Start validating EU VAT numbers

Free plan — 100 validations/month. No credit card required.

AG
Alberto García

Founder, TaxID

Building EU VAT validation tools for developers. Obsessed with compliance automation and developer experience.