United Kingdom (GB)¶
National-ID patterns loaded when you pass countries=["GB"] (or "all"). Universal patterns always stay.
UK is accepted as GB.
This is a detector, not a legal opinion
id-extract matches the shape of these numbers. A hit is not proof that the value was issued, is still valid, or that the cited statute applies to your document. Checksums, where present, only test the extra digit.
NINO_GB β National Insurance number¶
HMRC uses this number to record National Insurance contributions and tax against one person. GOV.UK describes it as 2 letters, 6 numbers, and a final letter.
| Package type | NINO_GB |
| Shape this package looks for | Two prefix letters (not all pairs), 6 digits, optional suffix A/B/C/D/F/M |
| Checksum | none |
| Example (synthetic) | AB123456C |
Official sources
VAT_GB β VAT registration number¶
The UK VAT number as used after Brexit. Common printed forms are GB plus 9 or 12 digits, or the government-department prefixes GD and HA.
| Package type | VAT_GB |
| Shape this package looks for | GB + 9 or 12 digits, or GBGD/GBHA + 3 digits |
| Checksum | none |
| Example (synthetic) | GB123456789 |
Official sources
COMPANIES_HOUSE_GB β Companies House company number¶
The registrarβs number for a company. England and Wales companies are usually 8 digits. Scotland and Northern Ireland use prefixes such as SC and NI.
| Package type | COMPANIES_HOUSE_GB |
| Shape this package looks for | Optional SC/NI/OC/SO + 6β8 digits |
| Checksum | none |
| Example (synthetic) | SC123456 |
Official sources
PASSPORT_GB β British passport number (from 2015)¶
The nine-character number printed on a British passport issued from 2015: two letters and seven digits. The letter pairs SC, NI, OC, and SO are omitted because those prefixes are Companies House numbers. The older nine-digit book number remains the universal pattern GB_PASSPORT.
| Package type | PASSPORT_GB |
| Shape this package looks for | Two letters + 7 digits, excluding SC, NI, OC, and SO |
| Checksum | none |
| Example (synthetic) | AB1234567 |
Official sources
NHS_GB β NHS number¶
The 10-digit number used to identify a patient in the NHS in England and Wales. It is printed in groups of 3, 3, and 4. The tenth digit is a check digit. A failed check is dropped, because ten digits are also an NPI.
| Package type | NHS_GB |
| Shape this package looks for | 10 digits, optional spaces or hyphens as 3-3-4 |
| Checksum | Modulus 11. Weights 10 through 2 on the first nine digits. Check digit = 11 β (sum mod 11). A result of 11 is stored as 0. A result of 10 is not issued. A failure is dropped. |
| Example (synthetic) | 943 476 5919 |
Official sources
DRIVERS_LICENSE_GB β Photocard driving licence number¶
The 16-character driver number printed on a Great Britain photocard licence.
| Package type | DRIVERS_LICENSE_GB |
| Shape this package looks for | 16 characters in the DVLA layout |
| Checksum | none |
| Example (synthetic) | MORGA753116SM9IJ |
Official sources
The example values are synthetic or well-known public test numbers. Do not treat them as issued identifiers.