Generator · Finnish data
Finnish Y-tunnus
Endpoint GET /v1/fi/y-tunnus
What it covers
Returns a valid Finnish Y-tunnus (business identity code) with a correct mod-11 check digit. Use `format` for the FI VAT number. Set `invalid=true` for a Y-tunnus with a deliberately wrong check digit.
How it’s calculated
The Finnish Y-tunnus (business identity code) ends in a single weighted mod-11 check digit computed as the 11-complement of the weighted sum of its seven leading digits, with residue 1 (complement 10) treated as an unissued prefix.
Algorithm
- Take the seven payload digits d1 d2 d3 d4 d5 d6 d7 (the Y-tunnus is 8 digits total; the 8th is the check digit).
- Multiply each payload digit by its fixed position weight from the list [7, 9, 10, 5, 8, 4, 2]: d1*7, d2*9, d3*10, d4*5, d5*8, d6*4, d7*2.
- Add the seven products together to get the weighted sum S.
- Compute the base residue: base = S mod 11.
- Compute the raw complement: raw = 11 - base.
- Resolve the raw value to the check digit: if raw == 11, the check digit is 0; if raw == 10 (i.e. base == 1), there is NO valid check digit — the prefix is not issued and must be redrawn; otherwise the check digit is raw itself (a value 2..9, or 0 came from the raw==11 case).
- Append the check digit as the 8th digit. Format 'national' renders it as ddddddd-c (seven digits, hyphen, check digit); format 'vat' renders it as FI followed by all eight bare digits with no hyphen.
Worked example
Y-tunnus with payload 1234567 and check digit ? (i.e. 1234567-?)
Payload digits: 1 2 3 4 5 6 7; weights: 7 9 10 5 8 4 2.
Products: 1*7=7, 2*9=18, 3*10=30, 4*5=20, 5*8=40, 6*4=24, 7*2=14.
Weighted sum S = 7+18+30+20+40+24+14 = 153.
base = 153 mod 11 = 10 (since 11*13 = 143, 153-143 = 10).
raw = 11 - 10 = 1.
raw is neither 11 nor 10, so the check digit is raw = 1.The check digit is 1, giving the full Y-tunnus 1234567-1 (VAT form FI12345671).
Edge cases
- Residue base == 1 (raw complement == 10) has no single-digit representation: such a seven-digit prefix is never issued. The generator's computeYTunnusCheckDigit returns undefined and the draw loop redraws a fresh prefix.
- Residue base == 0 gives raw == 11, which maps to check digit 0 (not 11).
Gotchas
- The first payload digit is drawn 1-9 (not 0) for the common Y-tunnus shape; the remaining six are 0-9. This is a generation choice, not a checksum rule — the checksum itself does not forbid a leading zero.
- The VAT form is literally 'FI' + the eight bare digits with NO hyphen; the hyphen appears only in the 'national' ddddddd-c grouping. The check digit is the same in both forms.
- The weight list applies to the seven payload digits in order; the 8th (check) digit has no weight of its own — it is the output, not an input to the sum.
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 Y-tunnukset 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: national `#######-#` form (default) or FI VAT number. |
| invalid | boolean | Return a Y-tunnus with a deliberately wrong mod-11 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 identifier in the requested format (national or VAT). |
| digits | string | The canonical, unhyphenated 8-digit Y-tunnus. |
Other generators for Finland
Finnish companyFinnish company nameFinnish email addressFinnish henkilötunnusFinnish IBANFinnish personFinnish person nameFinnish product or service offeringFinnish vehicle registration plate
See all generators for Finland →The same kind of identifier elsewhere
Austrian data · Austrian SVNRBelgian data · Belgian RijksregisternummerBulgarian data · Bulgarian EGNCroatian data · Croatian JMBGCroatian data · Croatian OIBCypriot data · Cyprus TICCzech data · Czech rodné čísloDanish data · Danish CPRDutch data · Dutch BSNEstonian data · Estonian isikukoodFrench data · French NIRGerman data · German Steuer-IdNrGreek data · Greek AFMGreek data · Greek AMKAHungarian data · Hungarian adóazonosító jelHungarian data · Hungarian személyi azonosítóHungarian data · Hungarian TAJIrish data · Irish PPSNItalian data · Italian Codice FiscaleLatvian data · Latvian personas kodsLithuanian data · Lithuanian asmens kodasLuxembourg data · Luxembourg matriculePolish data · Polish PESELPortuguese data · Portuguese NIFRomanian data · Romanian CNPSlovak data · Slovak rodné čísloSlovenian data · Slovenian davčna številkaSlovenian data · Slovenian EMŠOSpanish data · Spanish DNISpanish data · Spanish NIESwedish data · Swedish personnummer
Try it