Skip to main content

UK VAT Validator

Online UK corporate VAT validator. Ideal for integration and software QA.

How does VAT validation work?

Validation checks if the 9-digit string matches the positional weights from 8 to 2 on the first 7 base digits.

If the accumulated weighted sum plus the final two check digits of the VAT is divisible by 97 (or if adding 55 to the sum, it is divisible by 97), the document is valid.

Anatomy & Structure of UK VAT (9 Digits)

The UK VAT registration number issued by HMRC features 3 structural components:

PositionFieldLengthMeaning & RuleExample
PrefixCountry Code2 lettersOptional ISO "GB" prefix for cross-border tradeGB
1 to 7Base Number7 digitsSequential business registration number with HMRC1234567
8 & 9Check Digits2 digitsTwo-digit checksum computed via Modulo 97 (standard or +55)89

UK VAT Validation Algorithm (Standard & Alternative Modulo 97)

HMRC verifies the final 2 digits using positional weights from 8 down to 2:

(Sum + CheckDigits) % 97 == 0 || (Sum + 55 + CheckDigits) % 97 == 0
  1. 1. Extract the first 7 base digits.
  2. 2. Multiply each digit by position weights: [8, 7, 6, 5, 4, 3, 2] and calculate total Sum.
  3. 3. Standard Check: verify if (Sum + CheckDigits) % 97 == 0.
  4. 4. Alternative Check (+55): verify if (Sum + 55 + CheckDigits) % 97 == 0.
  5. 5. The VAT number is valid if either standard or alternative rule succeeds.

Validation FAQ