Generator · Hungarian data
Hungarian adószám
Endpoint GET /v1/hu/adoszam
What it covers
Returns a valid Hungarian adószám (company tax number) with a correct törzsszám check digit. Use `format` for the full national number or the HU VAT form. Set `invalid=true` for a number with a deliberately wrong check digit.
How it’s calculated
The Hungarian adószám (VAT/tax number) carries a weighted modulo-10 check digit on the 8-digit törzsszám: the eighth digit is the 10-complement of the weighted sum of the first seven digits (weights 9,7,3,1,9,7,3) taken modulo 10.
Algorithm
- Take the seven base (törzsszám) digits d1 d2 d3 d4 d5 d6 d7, in left-to-right order. The first is 1-9, the remaining six are 0-9.
- Multiply each digit by its position weight from the fixed weight vector [9, 7, 3, 1, 9, 7, 3]: w1=9, w2=7, w3=3, w4=1, w5=9, w6=7, w7=3.
- Sum the seven products: S = 9*d1 + 7*d2 + 3*d3 + 1*d4 + 9*d5 + 7*d6 + 3*d7.
- Take that sum modulo 10: r = S mod 10.
- Compute the 10-complement modulo 10: check = (10 - r) mod 10. The outer 'mod 10' means an r of 0 yields a check digit of 0 rather than 10, so the result is always a single decimal digit 0-9.
- Append the check digit as the eighth digit of the törzsszám, giving the full 8-digit core (7 base + 1 check).
- The complete adószám adds two more fields after the törzsszám: a single VAT code Y (1-5) and a two-digit county code ZZ (02-20 as generated; the full national scheme runs 02-44). These carry no checksum. National format is ########-Y-ZZ; the VAT (EU) form is 'HU' followed by the 8-digit törzsszám only.
Worked example
törzsszám base digits 1234567 with check digit ? (full core 1234567?)
Base digits: d1=1, d2=2, d3=3, d4=4, d5=5, d6=6, d7=7; weights [9,7,3,1,9,7,3].
Products: 1*9=9, 2*7=14, 3*3=9, 4*1=4, 5*9=45, 6*7=42, 7*3=21.
Sum S = 9 + 14 + 9 + 4 + 45 + 42 + 21 = 144.
r = 144 mod 10 = 4.
check = (10 - 4) mod 10 = 6.The check digit is 6, so the full törzsszám is 12345676 (e.g. national form 12345676-1-02, VAT form HU12345676).
Edge cases
- The check digit is fully determined by the first seven digits, so the eighth digit is never independently drawn — the generator computes it and appends it directly.
- The outer 'mod 10' in (10 - r) mod 10 matters only when r = 0: it maps the 10-complement of 10 back to 0, keeping the check digit a single digit.
Gotchas
- Only the first seven digits plus check digit (the törzsszám) participate in the checksum. The VAT code (Y, 1-5) and county code (ZZ, 02-20/02-44) are appended afterward and are NOT covered by any check digit.
- The weight vector is applied left-to-right starting at the first base digit (weight 9); it is not reversed and there is no separate weight for the check position (validation is done by recomputing from the seven base digits, not by a zero-sum-including-check form).
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: full national number (default) or HU VAT number. |
| invalid | boolean | Return a number with a deliberately wrong törzsszám 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 adószám in the requested format (national or VAT). |
| digits | string | The canonical 8-digit törzsszám. |
Other generators for Hungary
Hungarian adóazonosító jelHungarian cégjegyzékszámHungarian companyHungarian company nameHungarian email addressHungarian IBANHungarian personHungarian person nameHungarian product or service offeringHungarian személyi azonosítóHungarian TAJHungarian vehicle registration plate
See all generators for Hungary →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-IdNrIrish 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 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