Ireland (IE)

Irish VAT Number Validation

Format, pattern, and MOD 23 checksum algorithm for IE VAT numbers

Irish VAT numbers have multiple legacy and current 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
Length 8-9 characters
Examples IE4749148U IE8Y42002P IE6388047V

Regex Pattern

^IE[0-9][A-Z0-9][0-9]{5}[A-Z][A-Z]?$

Valid Formats

  1. Old format (8 chars): 7 digits + 1 letter
  2. New format (9 chars): 7 digits + 2 letters
  3. Alternative: digit + letter + 5 digits + 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 guidance shows multiple historical shapes (for example IE1234567A, IE1Z23456A, IE1234567AB). These examples are useful for structure, but not every documented legacy sample should be treated as a checksum-authoritative test vector. VatDB validates middle-letter legacy variants deterministically by canonical conversion before applying MOD 23. For rare trailing suffix letters outside the modeled lookup table, VatDB uses a not-confidently-invalid pass and relies on VIES for authority.

Source: Irish Revenue VIES guidance (PDF)

Frequently Asked Questions

How do I verify an Irish VAT number?

Use a two-step process: normalize/check format and checksum offline, then validate against VIES for authoritative assignment status. VatDB's API handles both.

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 digit + letter + 5 digits + 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 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