Check a UK VAT number: HMRC’s service, not VIES, since 2021

A UK (GB) VAT number cannot be checked on VIES: since 1 January 2021 the European Commission’s service holds only the 27 member states and, for goods under the Windsor Framework, Northern Ireland numbers with the XI prefix. The authority for GB numbers is HMRC’s free « Check a UK VAT number » service on GOV.UK and its API, which returns the registered name and address and, when you identify yourself with your own UK VAT number, a consultation number that is the evidence of the check. Veriport’s free VAT check and its API answer country_unknown for GB with this guidance rather than a false « invalid »; a UK endpoint is on the roadmap.

Why does VIES say my GB number is invalid or unknown?

Because VIES no longer holds it. From 1 January 2021 the United Kingdom left the EU VAT area; the Commission removed GB from VIES and kept only XI, the prefix Northern Ireland goods traders use under the Protocol, now the Windsor Framework. A tool that sends a GB number to VIES as if it were XI gets a confident « invalid » for a perfectly registered UK business. That is why this site answers country_unknown for GB and points here.

How do I check a GB number today?

By hand: the GOV.UK page « Check a UK VAT number » takes the 9 or 12 digits and shows the registered name and address; enter your own UK VAT number too and the page gives a reference you can keep. By API: HMRC’s « Check a UK VAT number » API v2.0.

curl — HMRC Check a UK VAT number API v2.0 (token from the client-credentials flow)
curl "https://api.service.hmrc.gov.uk/organisations/vat/check-vat-number/lookup/553557881" \
  -H "Accept: application/vnd.hmrc.2.0+json" \
  -H "Authorization: Bearer $HMRC_TOKEN"
200 OK — with a requester, HMRC adds consultationNumber
{
  "target": {
    "name": "EXAMPLE LTD",
    "vatNumber": "553557881",
    "address": {
      "line1": "1 EXAMPLE STREET",
      "postcode": "SW1A 1AA",
      "countryCode": "GB"
    }
  },
  "requester": "146295999727",
  "consultationNumber": "ypAeKRPlW",
  "processingDate": "2026-10-28T10:12:43+00:00"
}

What do the HMRC answers mean?

HTTP and codeMeaningWhat to do
200Registered: name, address, and the consultation number when you sent your own VRN.Keep processingDate, consultationNumber and the answer with the invoice.
404 NOT_FOUND« targetVrn does not match a registered company »: not registered, deregistered, or a typo.A normal answer, not an outage; check the digits and the check digit.
400 INVALID_REQUESTThe number is not 9 or 12 digits.Strip GB and spaces; GD and HA numbers cannot be sent.
403 INVALID_REQUEST (requester)Your own VRN is not a registered company.Check your requester number.
429 MESSAGE_THROTTLED_OUTMore than 3 requests a second for your application.Pace the batch.
503 SCHEDULED_MAINTENANCE, SERVER_ERROR, 504HMRC’s service is down or slow.Retry with backoff; serve your last dated answer meanwhile.

What about Northern Ireland (XI)?

A business in Northern Ireland that trades in goods with the EU has an XI number (the same digits as its GB number, with the XI prefix) and that number is in VIES. Send it with the XI prefix to the free check or to /vat/validate; for services, or for a business without an XI number, use HMRC. Do not translate GB into XI yourself: most UK businesses have no XI registration, and VIES would answer « invalid ».

What Veriport does today, and next

Today: GET /vat/validate answers 400 invalid_parameter with the code country_unknown and this guidance for GB (nothing is counted); the free check says the same. Next, on the roadmap: a UK endpoint on HMRC’s API with the same answer shape (valid, name, address, consultationNumber, provenance), the same dated cache for HMRC’s maintenance windows, and the structural check (9 or 12 digits, the modulo-97 check digit) before any call. It needs HMRC production credentials, which the publisher must apply for; the date is not promised.

Questions

Can I still use VIES for a UK company?
Only for a Northern Ireland goods trader with an XI number. For every other UK business, HMRC’s service is the only authority; VIES will say the number is invalid or unknown.
Is the HMRC check free?
Yes: the GOV.UK page is free, and the API is free with a Developer Hub application (sandbox first, then production credentials after HMRC accepts the application and its Terms of Use).
Does a UK VAT number have a check digit?
Yes, the ninth digit: weights 8,7,6,5,4,3,2,10,1 over the nine digits, modulo 97; numbers issued after 2010 may use the « 9755 » variant (remainder 55). HMRC publishes no algorithm; the reference implementations agree on this one.

For the 27 member states and Northern Ireland, on VIES, with a dated answer.

Free VAT number check (EU and XI)

Sources