vatverify home
All guides

What is a VAT number? A practical guide for developers and businesses

A VAT number is the identifier a national tax authority issues to a business once it is registered for VAT. Inside the EU it is country-prefixed and validatable through VIES. Includes format details, country examples, and how to validate one programmatically.

TL;DR

  • A VAT number is a country-specific identifier issued to a business that is registered for value-added tax.
  • Inside the EU, VAT numbers carry an ISO 3166 country prefix (with two intentional exceptions: EL for Greece, XI for Northern Ireland) and are validatable through VIES.
  • Outside the EU, each country has its own registry: HMRC for the UK, BFS for Switzerland and Liechtenstein, BRREG for Norway.
  • Format varies dramatically by country. A regex that hardcodes a single length is wrong for several jurisdictions.

What a VAT number actually is

A VAT number is the identifier a national tax authority assigns to a business when that business registers for value-added tax. The number is the legal handle for the VAT account. It is what appears on invoices, what tax authorities exchange when validating cross-border supplies, and what an audit trail references when challenging the VAT treatment of a transaction.

VAT numbers serve three practical functions in modern e-commerce and B2B systems:

  1. Invoice compliance. EU rules require both the supplier's and the buyer's VAT number to appear on a B2B invoice (Article 226 of the VAT Directive 2006/112/EC). Without the buyer's VAT number, the supplier cannot zero-rate an intra-Community supply and must charge local VAT instead.
  2. Place-of-supply determination. For B2B services in the EU, place of supply follows the buyer. The buyer's VAT number is the evidence that the buyer is a taxable person, which is what unlocks the place-of-supply rule.
  3. Reverse-charge eligibility. Cross-border B2B sales between EU member states use the reverse-charge mechanism: the seller invoices net of VAT and the buyer self-accounts. A valid, registered buyer VAT number is the trigger that qualifies the sale.

A VAT number is not a company registration number. It is a separate identifier issued by a different authority (in most countries the tax administration, not the corporate registry). The two often look similar, sometimes share digits, but they serve different purposes.

EU format conventions

Inside the EU, every VAT number has a 2-character country prefix followed by a country-specific body. The prefix follows ISO 3166-1 alpha-2 with two intentional deviations:

  • EL for Greece (not GR). Derived from "Hellas".
  • XI for Northern Ireland (not part of ISO 3166). Created post-Brexit for Northern Ireland goods trade with the EU under the Windsor Framework.

A validator that recognizes only ISO 3166 codes will reject correctly-formatted Greek and Northern Irish numbers.

The body of the number varies dramatically. A few examples to make the variation concrete:

CountryFormatExampleNotes
GermanyDE + 9 digitsDE123456789Distinct from the domestic Steuernummer
FranceFR + 2 alphanumeric + 9 digitsFRK7123456789The 2-character key can include letters
ItalyIT + 11 digitsIT12345678901Partita IVA, distinct from Codice Fiscale
NetherlandsNL + 9 digits + B + 2 digitsNL123456789B01The literal B is fixed
CyprusCY + 8 digits + 1 letterCY12345678XThe trailing letter is part of the canonical form
CzechiaCZ + 8, 9, or 10 digitsCZ12345678Length varies by registrant type

A regex that hardcodes a single length will reject correctly-formed numbers from several member states. See the country pages for the format and structural rules per country.

Outside the EU

Three European jurisdictions outside the EU have their own VAT registries:

  • United Kingdom (GB): 9 or 12 digits, validated against HMRC. The 12-digit form is a branch trader number (9-digit root plus 3-digit branch suffix). Post-Brexit, GB numbers are no longer queryable through VIES.
  • Switzerland (CHE-): validated against the Swiss Federal Statistical Office (BFS) UID register. The format is CHE-xxx.xxx.xxx with dots; an optional MWST / IVA / TVA suffix indicates linguistic region.
  • Liechtenstein: shares the Swiss CHE- prefix and BFS register under a 1923 customs and VAT union. Liechtenstein businesses are structurally indistinguishable from Swiss ones at the number level; the jurisdiction is inferred from the registered business address.
  • Norway (NO): 9 digits validated against the Brønnøysund Register (BRREG), with an optional MVA suffix indicating VAT-registered status.

VAT numbers from non-EU European countries are never in VIES. A VIES-only validator returns "unknown country" for every UK, Swiss, Liechtenstein, or Norwegian number.

VAT number vs other tax identifiers

The most common source of confusion in B2B onboarding flows: customers supplying the wrong identifier when asked for their VAT number. A few examples:

  • A German customer often supplies their Steuernummer (domestic income-tax identifier) instead of the EU-facing USt-IdNr. See the Steuernummer glossary for the difference.
  • An Italian customer may supply their Codice Fiscale (16-character alphanumeric identifier for income tax and social administration) instead of their Partita IVA. The two are different formats.
  • A French customer may supply their SIREN (9-digit corporate identifier) instead of the full TVA intracommunautaire (FR{key}{SIREN}). The SIREN is part of the VAT number but is not itself the VAT number.

A robust onboarding flow validates the format first. A structurally-malformed input is almost always one of these adjacent identifiers; rejecting at the format check produces a clearer error message than letting it round-trip to VIES and come back as invalid.

How VAT number validation works

Validation has two layers:

  1. Format validation runs offline against a regex and (for most countries) a check-digit algorithm. This catches typos and misplaced identifiers without any registry call. It is fast (microseconds) and free.
  2. Registration validation queries the issuing country's registry to confirm that the number is currently registered. This requires a network call, takes seconds, and the registries have outages.

For most use cases, the structurally-valid-but-not-registered case is the interesting one. A number that is structurally valid means the buyer probably gave you something real; whether it is currently registered is what changes by the day.

vatverify's /v1/validate does both checks in a single call. A typical response:

{
  "data": {
    "vat_number": "DE123456789",
    "valid": true,
    "country": "DE",
    "company": null,
    "consultation_number": "WAPIAAAA1234..."
  },
  "meta": {
    "request_id": "req_...",
    "fetched_at": "2026-04-28T10:15:32Z",
    "source": "vies"
  }
}

The consultation_number is a VIES-issued reference identifier that proves the lookup happened. It is the audit-trail artifact that protects a seller's good-faith position if a tax authority later challenges a zero-rated invoice. See the consultation number glossary for the audit-trail mechanic.

Three identifiers worth knowing

Beyond the basic VAT number, three related identifiers come up in EU compliance:

  • OSS ID: a single-stop-shop registration for B2C distance sales of goods and digital services across the EU. Format follows the home member state's normal registration scheme; reported through OSS returns rather than per-country VAT returns.
  • IOSS ID: a 12-character identifier starting with IM (e.g. IM1234567890). Used for distance sales of imported goods up to €150 to EU consumers. Issued separately from a regular VAT number.
  • EORI number: the EU's economic operator registration identifier for customs purposes. Different from VAT but often appears on the same B2B forms.

OSS and IOSS IDs are not validated through VIES. EORI validation is a separate EU service (ec.europa.eu/taxation_customs/dds2/eos/).

Common questions

Is a VAT number the same as a tax ID?

Loosely yes, strictly no. A "tax ID" is a generic term that covers any identifier a tax authority issues. A VAT number specifically refers to the VAT registration. A business may have a VAT number and a separate income-tax-only identifier; the two are not interchangeable.

Can I derive a VAT number from a company registration number?

Sometimes yes, sometimes no, depending on country. In Czechia, the legal-entity DIČ is CZ plus the IČO (corporate registration number). In Belgium, the VAT number and the CBE/KBO number share the same 10-digit body. In France, the SIREN is embedded in the TVA number with a 2-character key prepended. In Germany, the USt-IdNr. and the Handelsregister number are unrelated.

The general rule: do not infer a VAT number from a corporate registration number programmatically. Ask the customer for the VAT number explicitly.

How often does a VAT number change?

Rarely. A business's VAT number is stable across most of its lifetime. A number can become invalid for three reasons: deregistration (revenue dropped below threshold, business closed or restructured), administrative deregistration (tax authority pulled registration for compliance reasons), or a major restructuring that issues a new entity. Annual or quarterly re-validation of B2B customer lists is the typical cadence.

What happens at checkout if the VAT number is invalid?

For a cross-border B2B sale, an invalid VAT number means you cannot apply reverse-charge. The seller has to either reject the order or charge their domestic VAT rate on it. Many B2B checkouts simply block the order and surface the error to the customer, who can then correct the number or contact support.

Validate VAT in three lines.

Free up to 500 requests per month. No credit card.

Start free