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

Source: https://veriport.io/guides/check-uk-vat-number-hmrc-not-vies (published 2026-10-28)

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.

- Format: 9 digits (`GB 123 4567 89`), or 12 digits for a branch (the 9 digits plus a 3-digit branch code); government departments use `GD` + 3 digits and health authorities `HA` + 3 digits (HMRC manual VATGPB9400). The check digit uses weights 8,7,6,5,4,3,2,10,1 modulo 97 (reference implementation: python-stdnum; HMRC publishes no algorithm).
- HMRC’s API (v2.0, the only live version since v1.0 was retired on 17 February 2025) answers `lookup/{targetVrn}` with the trader, and `lookup/{targetVrn}/{requesterVrn}` with a `consultationNumber` and `processingDate`: the equivalent of the VIES consultation number.
- Access is an application-restricted OAuth 2.0 token (client credentials) from a Developer Hub application; 3 requests a second; a 404 `NOT_FOUND` means « not a registered company », a 400 `INVALID_REQUEST` a malformed number.
- What this changes for an invoice: a GB customer is outside the EU VAT area; intra-EU zero-rating with a VIES check does not apply. The evidence of a UK check is HMRC’s consultation number and date.

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

```bash
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"
```

```json
{
  "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 code | Meaning | What to do |
|---|---|---|
| 200 | Registered: 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_REQUEST` | The 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_OUT` | More than 3 requests a second for your application. | Pace the batch. |
| 503 `SCHEDULED_MAINTENANCE`, `SERVER_ERROR`, 504 | HMRC’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.

## Read next

- [VAT number check (VIES)](https://veriport.io/tools/vat-number-check)
- [Swiss and Norwegian VAT numbers](https://veriport.io/guides/swiss-norwegian-vat-number-check)
- [VAT number formats by country](https://veriport.io/vat-number-format)
- [Roadmap](https://veriport.io/roadmap)
- [Reference: GET /vat/validate](https://veriport.io/docs/vat-validation)

## Sources

- GOV.UK — Check a UK VAT number (the free HMRC service; UK numbers are not in VIES since 1 January 2021) — https://www.gov.uk/check-uk-vat-number (2026-10-28)
- HMRC Developer Hub — Check a UK VAT number API v2.0: lookup/{targetVrn} and lookup/{targetVrn}/{requesterVrn} (consultation number), OAuth 2.0 client credentials, 3 requests a second — https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/vat-registered-companies-api/2.0 (2026-10-28)
- HMRC internal manual VATGPB9400 — VAT registration numbers of government departments (GD) and health authorities (HA) — https://www.gov.uk/hmrc-internal-manuals/vat-government-and-public-bodies/vatgpb9400 (2026-10-28)
- VIES — VAT Information Exchange System: FAQ and VAT number structures (Q11) — https://ec.europa.eu/taxation_customs/vies/#/faq (2026-10-24)
