Generator · Italian data
Italian Partita IVA
Endpoint GET /v1/it/partita-iva
What it covers
Returns a valid Italian Partita IVA (business/VAT identifier) with a correct Luhn checksum. Use `format=vat` for the IT-prefixed EU VAT number. Set `invalid=true` for a Partita IVA with a deliberately wrong check digit.
How it’s calculated
The 11th digit of an Italian Partita IVA is a standard Luhn (mod-10) check digit computed over the first 10 payload digits.
Algorithm
- Take the 10 payload digits (positions 1-10, left to right). Leading zeros are significant and must be kept.
- Walk the payload from right to left. Start with a 'doubling' flag set to true, so the rightmost payload digit is the first digit doubled.
- For each digit: if the doubling flag is true, multiply the digit by 2, and if the result is greater than 9 subtract 9 from it (equivalent to summing its two decimal digits). If the doubling flag is false, use the digit unchanged.
- Add the resulting value to a running sum.
- Flip the doubling flag after each digit (so doubling alternates: rightmost doubled, next not, next doubled, ...).
- After processing all 10 digits, compute check = (10 - (sum mod 10)) mod 10. The outer mod 10 maps a remainder of 0 back to a check digit of 0.
- Append this single check digit as the 11th and final digit of the Partita IVA.
Worked example
Partita IVA with payload 1234567890 and check digit ? (i.e. 1234567890?)
Payload digits: 1 2 3 4 5 6 7 8 9 0. Process right to left, doubling the rightmost digit first.
Position 10, digit 0 (double): 0*2 = 0 -> 0
Position 9, digit 9 (keep): 9
Position 8, digit 8 (double): 8*2 = 16 -> 16-9 = 7
Position 7, digit 7 (keep): 7
Position 6, digit 6 (double): 6*2 = 12 -> 12-9 = 3
Position 5, digit 5 (keep): 5
Position 4, digit 4 (double): 4*2 = 8 -> 8
Position 3, digit 3 (keep): 3
Position 2, digit 2 (double): 2*2 = 4 -> 4
Position 1, digit 1 (keep): 1
Sum = 0+9+7+7+3+5+8+3+4+1 = 47
check = (10 - (47 mod 10)) mod 10 = (10 - 7) mod 10 = 3The check digit is 3, so the full Partita IVA is 12345678903.
Edge cases
- A payload that yields sum mod 10 == 0 produces a check digit of 0 (the outer '% 10' in (10 - (sum % 10)) % 10 maps the would-be 10 back to 0).
- Payloads are drawn freely with leading zeros allowed and significant, so an all-zero payload 0000000000 is a valid input; its Luhn sum is 0 and its check digit is 0.
Gotchas
- The doubling starts at the rightmost PAYLOAD digit because the check digit sits to its right; equivalently, in 1-indexed left-to-right terms over the 10-digit payload, the even positions (2,4,6,8,10) are the ones doubled.
- Overflow on doubling uses the subtract-9 rule (value -= 9 when value > 9), which is identical to summing the two digits of the product; the generator passes no custom modulus or complement — it relies on the shared luhnCheckDigit exactly as-is.
- The generator only computes/validates the mod-10 check digit and does not verify that the number belongs to a registered company; values are synthetic.
Parameters
| Parameter | Type | Description |
|---|---|---|
| count | integer1–1000 | Number of records to return, 1–1000 (your plan may lower this). Omitted returns a single record; set it for a batch. |
| edge | boolean | Restrict output to valid edge-case numbers from the rare corners. |
| extreme | boolean | Return a correct value wrapped in a hostile encoding (untrimmed whitespace, invisible/zero-width characters, BOM, or bidi/combining marks). Homoglyphs are excluded so the value stays machine-parseable; it still validates after normalisation. |
| format | "national" | "vat" | Rendering: bare 11-digit Partita IVA (default) or IT-prefixed VAT number. |
| invalid | boolean | Return a Partita IVA with a deliberately wrong Luhn check digit. |
| seed | integer | Integer seed for reproducible output: the same seed always yields the same record. |
Response fields
| Field | Type | Description |
|---|---|---|
| value | string | The Partita IVA in the requested format (national or VAT). |
| digits | string | The canonical, unprefixed 11-digit Partita IVA. |
Other generators for Italy
Italian Codice FiscaleItalian companyItalian company nameItalian email addressItalian IBANItalian personItalian person nameItalian product or service offeringItalian vehicle registration plate
See all generators for Italy →The same kind of identifier elsewhere
Austrian data · Austrian FirmenbuchnummerAustrian data · Austrian SteuernummerAustrian data · Austrian UIDBelgian data · Belgian OndernemingsnummerBulgarian data · Bulgarian EIKCzech data · Czech IČODanish data · Danish CVRDutch data · Dutch btw-idDutch data · Dutch KvK numberDutch data · Dutch RSINEstonian data · Estonian KMKREstonian data · Estonian registrikoodFrench data · French SIRENGerman data · German HandelsregisternummerGerman data · German Personalausweis numberGerman data · German USt-IdNrGerman data · German Wirtschafts-IdNrHungarian data · Hungarian adószámHungarian data · Hungarian cégjegyzékszámIrish data · Irish CRO numberIrish data · Irish VAT numberLatvian data · Latvian registracijas numursLithuanian data · Lithuanian įmonės kodasLithuanian data · Lithuanian PVM (VAT) numberLuxembourg data · Luxembourg TVAMaltese data · Maltese identity card numberMaltese data · Maltese VAT numberPolish data · Polish driving licence numberPolish data · Polish ID card numberPolish data · Polish KRS numberPolish data · Polish land and mortgage register numberPolish data · Polish NIPPolish data · Polish passport numberPolish data · Polish REGONPortuguese data · Portuguese Cartão de Cidadão numberRomanian data · Romanian CUI/CIFSlovak data · Slovak IČ DPHSlovak data · Slovak IČOSpanish data · Spanish CIFSwedish data · Swedish organisationsnummer
Try it