Generator · Hungarian data
Hungarian TAJ
Endpoint GET /v1/hu/taj
What it covers
Returns a valid Hungarian TAJ (társadalombiztosítási azonosító jel) with a correct mod-10 check digit. The TAJ is non-semantic — it encodes no birth date or sex. Set `invalid=true` for a deliberately wrong check digit.
How it’s calculated
The Hungarian TAJ (social-insurance number) check digit is the weighted sum of the first eight digits under alternating weights 3 and 7, taken directly modulo 10 (not a 10's-complement).
Algorithm
- A TAJ is 9 digits: 8 payload digits d1..d8 followed by 1 check digit d9.
- Assign the fixed position weights [3, 7, 3, 7, 3, 7, 3, 7] to the eight payload digits in order (d1 gets 3, d2 gets 7, d3 gets 3, and so on, alternating).
- Compute the weighted sum: sum = 3*d1 + 7*d2 + 3*d3 + 7*d4 + 3*d5 + 7*d6 + 3*d7 + 7*d8.
- The check digit is sum mod 10, taken DIRECTLY as the remainder (there is no 10-complement and no 'subtract from 10' step).
- The result is always a single decimal digit 0-9, so it is appended as-is to the eight payload digits to form the full 9-digit TAJ.
- To validate an existing TAJ: recompute the check digit from the first eight digits and confirm it equals the ninth digit. Equivalently, weighting the ninth digit by -1, the whole nine-digit number sums to 0 mod 10.
Worked example
TAJ payload 12345678? (compute the 9th, check digit)
Payload digits: d1..d8 = 1,2,3,4,5,6,7,8
Weights: 3,7,3,7,3,7,3,7
Products: 3*1=3, 7*2=14, 3*3=9, 7*4=28, 3*5=15, 7*6=42, 3*7=21, 7*8=56
Sum = 3+14+9+28+15+42+21+56 = 188
Check digit = 188 mod 10 = 8 (taken directly as the remainder)The check digit is 8, so the full valid TAJ is 123456788.
Edge cases
- Leading-zero TAJ: the first digit may be 0 (produced by the edge generator), so a numeric parse silently drops it to eight characters — TAJ must be kept as a string.
- Zero check digit: the ninth digit can legitimately be 0 when the weighted sum is a multiple of 10 (e.g. sum 188 gives 8, but sums like 190 would give 0), so a 'trailing digit is non-zero' assumption is wrong.
- Repeated-pattern payload: all eight payload digits identical still produces a valid TAJ, so 'looks like a placeholder' filters wrongly reject genuine values.
Gotchas
- The check digit is the raw remainder sum mod 10 — NOT 10 minus the remainder. Applying a 10's-complement (as many other national schemes use) yields the wrong digit.
- The weights alternate 3,7,3,7,3,7,3,7 across the eight payload digits; do not start with 7 or use a Luhn-style 2,1,2,1 pattern.
- The modulus is 10 despite the primitive living in mod11.ts — only the generic weightedSum helper is reused; the '% 10' and the 3/7 weights are supplied by the TAJ generator itself.
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 TAJs 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 TAJ with a deliberately wrong 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 TAJ as a bare 9-digit string. |
| digits | string | The canonical 9-digit number. |
Other generators for Hungary
Hungarian adóazonosító jelHungarian adószámHungarian cégjegyzékszámHungarian companyHungarian company nameHungarian email addressHungarian IBANHungarian personHungarian person nameHungarian product or service offeringHungarian személyi azonosítóHungarian vehicle registration plate
See all generators for Hungary →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 isikukoodFinnish data · Finnish henkilötunnusFinnish data · Finnish Y-tunnusFrench data · French NIRGerman data · German Steuer-IdNrGreek data · Greek AFMGreek data · Greek AMKAIrish 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