Generator · Polish data
Polish REGON
Endpoint GET /v1/pl/regon
What it covers
Returns a valid Polish REGON (business registry number) with correct check digit(s). Use `variant` to choose the 9-digit (`short`) or 14-digit (`long`) form, or `any` to pick one at random. Set `invalid=true` to get a REGON with a deliberately wrong check digit (both check digits for a long REGON), for testing checksum validators.
How it’s calculated
REGON's check digit is a weighted sum of the preceding digits taken modulo 11, with a remainder of 10 folded down to 0.
Algorithm
- Decide the variant. A short REGON is 9 digits: 8 base digits followed by 1 check digit. A long REGON is 14 digits: a full valid 9-digit REGON, then 4 more base digits, then 1 check digit. The 9-digit prefix of a 14-digit REGON is itself a valid 9-digit REGON.
- For the 9-digit check digit, take the 8 base digits d1..d8 and the weight vector W = [8, 9, 2, 3, 4, 5, 6, 7] (weight index i lines up with base digit i, both left to right).
- For the 14-digit check digit, take the 13 base digits d1..d13 and the weight vector W = [2, 4, 8, 5, 0, 9, 7, 3, 6, 1, 2, 4, 8].
- Compute the weighted sum S = sum over i of (W[i] * d[i]).
- Compute r = S mod 11.
- Compute the check digit c = r mod 10. In other words, if r is 10 the check digit is 0; otherwise the check digit is r itself. No prefix ever has to be redrawn — every base string yields a valid check digit.
- Append c as the final digit to produce the complete REGON.
Worked example
9-digit REGON with base digits 12345678 and check digit ?
Base digits: 1 2 3 4 5 6 7 8; weights: 8 9 2 3 4 5 6 7.
Products: 1*8=8, 2*9=18, 3*2=6, 4*3=12, 5*4=20, 6*5=30, 7*6=42, 8*7=56.
Weighted sum S = 8+18+6+12+20+30+42+56 = 192.
r = 192 mod 11 = 192 - 187 = 5 (since 11*17 = 187).
Check digit c = 5 mod 10 = 5.The check digit is 5, so the full REGON is 123456785.
Edge cases
- A weighted-sum remainder of exactly 10 is not a valid single digit; REGON folds it to 0 (r mod 10), so both remainder 0 and remainder 10 produce check digit 0.
- The 14-digit long REGON embeds a complete, independently-valid 9-digit REGON as its first nine digits; the long check digit is computed over all 13 preceding digits, not just the extra four.
Gotchas
- The two variants use different weight vectors AND different positions: the short vector [8,9,2,3,4,5,6,7] is not a prefix or suffix of the long vector [2,4,8,5,0,9,7,3,6,1,2,4,8]. One of the long weights is 0, so the fifth base digit of a 14-digit REGON never affects its check digit.
- Unlike Polish NIP (which also uses mod-11 but rejects a remainder of 10 and requires redrawing), REGON never rejects: the remainder-10 → 0 fold guarantees every base string is valid.
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 REGONs 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. |
| invalid | boolean | Return a REGON with a deliberately wrong check digit. |
| seed | integer | Integer seed for reproducible output: the same seed always yields the same record. |
| variant | "short" | "long" | "any" | REGON length: short (9-digit), long (14-digit), or any. |
Response fields
| Field | Type | Description |
|---|---|---|
| value | string | The REGON: 9 digits (short) or 14 digits (long). |
| variant | "short" | "long" | Which REGON variant was produced. |
Other generators for Poland
Polish addressPolish companyPolish company namePolish driving licence numberPolish email addressPolish IBANPolish ID card numberPolish KRS numberPolish land and mortgage register numberPolish NIPPolish passport numberPolish personPolish person namePolish PESELPolish product or service offeringPolish vehicle registration plate
See all generators for Poland →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 numberItalian data · Italian Partita IVALatvian 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 numberPortuguese 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