Irish VAT Number Validation
Format, pattern, and MOD 23 checksum algorithm for IE VAT numbers
Irish VAT numbers have multiple current and legacy formats, making them one of the more complex EU VAT formats. Offline checks use a regex pattern plus MOD 23 checksum logic with a letter lookup table. Legacy middle-letter numbers are first converted to a canonical form before checksum calculation.
Format vs. Active Validation
Offline checks are useful for basic pre-validation, but you should ensure the IE VAT number is truly active and valid. Use VatDB's API to verify whether a number is actually assigned and active.
Format Overview
| Property | Value |
|---|---|
| Country Code | IE |
| Format | 7 digits + 1-2 letters (Example: IE4749148U)or 1 digit + 1 letter + 5 digits + 1 letter (legacy format, example: IE8Y42002P) |
| Length | 8-9 characters (10-11 characters with IE country prefix) |
| Examples | IE4749148U IE8Y42002P IE6388047V |
Regex Pattern
^IE[0-9][A-Z0-9][0-9]{5}[A-Z][A-Z]?$
This regex covers the documented legacy middle-letter shape such as
IE1Z23456A because the second character may be a letter. It does not
accept rare old variants that use + or * in the second position.
Valid Formats
- New format: 7 digits + 1-2 letters
- Legacy format: 1 digit + 1 letter + 5 digits + 1 letter
Checksum Algorithm (MOD 23)
def validate_ie_vat(number):
if number.startswith('IE'):
number = number[2:]
letters = "WABCDEFGHIJKLMNOPQRSTUV"
weights = [8, 7, 6, 5, 4, 3, 2]
if len(number) not in (8, 9):
return False
# Legacy middle-letter format:
# D L D D D D D C [S] -> 0 D D D D D D C [S]
if number[1].isalpha():
number = f"0{number[2:7]}{number[0]}{number[7:]}"
if not number[:7].isdigit() or number[7] not in letters:
return False
total = sum(int(d) * w for d, w in zip(number[:7], weights))
if len(number) == 9:
if number[8] not in letters:
return True # permissive for uncertain suffix mappings
total += letters.index(number[8]) * 9
check = letters[total % 23]
return number[7] == check
Legacy Format Note
Irish Revenue lists several historical shapes, including IE1234567A,
IE1Z23456A, and IE1234567AB. Treat those as format examples, not proof
that the sample numbers pass checksum validation. VatDB rewrites middle-letter
legacy numbers into the standard order before applying MOD 23.
Frequently Asked Questions
How do I verify an Irish VAT number?
Use VatDB's API to check whether the number is really active and valid, not just whether it matches the Irish format and checksum rules.
What does an Irish VAT number look like?
Irish VAT numbers can appear as IE1234567A (8 chars), IE1234567WA (9 chars), or legacy variants like IE1A23456B / IE1Z23456A. They include digits plus 1-2 letters.
How many characters are in an Irish VAT number?
Irish VAT numbers have either 8 or 9 characters after the IE prefix: 7 digits + 1 letter (old format) or 7 digits + 2 letters (new format), or 1 digit + 1 letter + 5 digits + 1 letter.
How does VatDB validate legacy middle-letter Irish VAT numbers?
VatDB converts legacy middle-letter shapes to the canonical 7-digit MOD 23 input and then applies the checksum calculation. Structure examples in Revenue guidance are treated as format examples, not checksum test vectors.
Why are there different Irish VAT number formats?
Ireland introduced the 9-character format to expand capacity as registrations grew. The older 8-character format (7 digits + 1 letter) is still valid but new registrations typically use 9 characters.
Where can I check an Irish company's VAT number?
Use VatDB's VAT number validation tool or our API for instant VAT validation against official EU and national databases. Returns company details with each verification.
What's the difference between format validation and checking if a VAT number is active?
Format validation checks correctness only - it doesn't query any database. Numbers can be deregistered or never issued. VatDB performs real-time lookups for definitive status.
What are real world examples of Irish VAT numbers?
Try these active, real Irish (IE) VAT numbers: IE4749148U, IE8Y42002P, IE6388047V.
Validate Irish VAT Numbers Instantly
Use our API for real-time IE VAT number validation across all formats
Try Free