UK Driving Licence Validator
Validate UK Driving Licence Numbers. Enforces structural DVLA standards.
How UK DLN validation works
The validator cleans input hyphens/spaces and validates total length (exactly 16 characters). It checks if it matches the official regex template (5 letters/9s, birth year decade, month, day, year unit, initials, and overlap letters).
It decodes calendar coordinates from the middle positions to determine birth month, day, and gender mapping, verifying the logical consistency of the licence.
Anatomy & Structure of British DLN (16 Characters)
The DVLA driving licence number encodes personal demographic data in 16 characters:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 to 5 | Surname | 5 letters | First 5 letters of surname (padded with "9" if shorter) | SMITH |
| 6 | Decade Digit | 1 digit | Decade digit of birth year (e.g. "8" for 1985) | 8 |
| 7 & 8 | Birth Month | 2 digits | Month 01-12 (+50 added for female drivers: 51-62) | 62 |
| 9 & 10 | Birth Day | 2 digits | Calendar day of birth (01 to 31) | 15 |
| 11 | Year End Digit | 1 digit | Final digit of birth year (e.g. "5" for 1985) | 5 |
| 12 & 13 | Initials | 2 chars | First and middle name initials (padded with "9") | JD |
| 14 to 16 | Security & Version | 3 chars | Security digit (usually "9") and two-letter issue code | 9AA |
DLN Demographic Encoding Algorithm (DVLA)
The British driving licensing agency (DVLA) encodes gender and dates using arithmetic rules in positions 6 to 11:
Real_Month = Encoded_Month >= 50 ? Encoded_Month - 50 : Encoded_Month
- 1. The first 5 characters contain the uppercase surname.
- 2. Positions 7 & 8: if value >= 50, the driver is female; subtract 50 to find the true birth month (1 to 12).
- 3. If positions 7 & 8 are between 01 and 12, the driver is male.
- 4. Positions 9 & 10 represent calendar day of birth (01 to 31).
- 5. The decade digit (pos 6) and year-end digit (pos 11) reconstruct the birth year.