Generator · Greek data
Greek AMKA
Endpoint GET /v1/gr/amka
What it covers
Returns a valid Greek AMKA (social-security number) with a correct Luhn check digit. Constrain with `sex` and age/birth-date filters (the full birth date is encoded). Contradictory combinations are rejected with a 400. Set `invalid=true` for a deliberately wrong check digit.
How it’s calculated
The 11th digit of a Greek AMKA is a standard Luhn (mod-10) check digit computed over the first ten digits.
Algorithm
- Take the first ten digits of the AMKA as the payload (positions 1-10): a 6-digit DDMMYY birth-date head, a 3-digit serial (positions 7-9), and a sex/parity digit (position 10). The check digit is the 11th and is NOT part of the payload.
- Process the ten payload digits from right to left. Starting with the rightmost payload digit, alternately mark digits as 'doubled' and 'not doubled' — the rightmost payload digit IS doubled, the next is not, the next is doubled, and so on.
- For each digit marked 'doubled', multiply it by 2; if the product exceeds 9, subtract 9 from it (equivalently, add the two digits of the product).
- For each digit marked 'not doubled', keep its value unchanged.
- Add all the resulting values together to get sum.
- Compute the check digit as (10 - (sum mod 10)) mod 10. The outer mod 10 makes a residue of 0 map to a check digit of 0 rather than 10.
- Append this single check digit as the 11th digit to form the full AMKA.
Worked example
AMKA for a male born 01/01/1985, serial 234, sex digit 7: 0101852347? (10-digit payload, check digit unknown)
Payload (positions 1-10): 0 1 0 1 8 5 2 3 4 7
Walk right to left, doubling the rightmost payload digit first (doubled positions marked *):
pos10 = 7* -> 7*2 = 14 -> 14-9 = 5
pos9 = 4 -> 4
pos8 = 3* -> 3*2 = 6
pos7 = 2 -> 2
pos6 = 5* -> 5*2 = 10 -> 10-9 = 1
pos5 = 8 -> 8
pos4 = 1* -> 1*2 = 2
pos3 = 0 -> 0
pos2 = 1* -> 1*2 = 2
pos1 = 0 -> 0
sum = 5+4+6+2+1+8+2+0+2+0 = 30
check = (10 - (30 mod 10)) mod 10 = (10 - 0) mod 10 = 0The check digit is 0, giving the full AMKA 01018523470.
Edge cases
- The 10th digit encodes sex by parity: odd -> male, even -> female. The generator sets it deliberately (sexDigit = random(0..4)*2 + parity) so the reported sex is truthful; the checksum itself does not enforce sex parity.
- The first six digits are a DDMMYY birth-date head; the encodable birth-date range is clamped to 1900-01-01 through 2099-12-31 (two-digit year, no explicit century marker in the number).
Gotchas
- The check digit uses the (10 - (sum mod 10)) mod 10 form: when sum mod 10 is 0 the check digit is 0, not 10. Forgetting the outer mod 10 yields an invalid two-digit result.
- Luhn doubling starts on the RIGHTMOST PAYLOAD digit (position 10), because the check digit is appended to its right and is excluded from the payload. Doubling the wrong alternating set inverts the parity and produces a wrong digit.
Parameters
| Parameter | Type | Description |
|---|---|---|
| atAge | integer | Exact age in years at request time. |
| bornAfter | stringpattern ^\d{4}(?:-\d{2}(?:-\d{2})?)?$ | Born after this date or fragment (YYYY, YYYY-MM, YYYY-MM-DD). |
| bornBefore | stringpattern ^\d{4}(?:-\d{2}(?:-\d{2})?)?$ | Born before this date or fragment (YYYY, YYYY-MM, YYYY-MM-DD). |
| bornOn | stringpattern ^\d{4}(?:-\d{2}(?:-\d{2})?)?$ | Born on a date or within a fragment: YYYY, YYYY-MM, or YYYY-MM-DD. |
| 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 edge-case values. |
| 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 an AMKA with a deliberately wrong Luhn check digit; date/sex stay valid. |
| olderThan | integer | Minimum age in years at request time. |
| seed | integer | Integer seed for reproducible output: the same seed always yields the same record. |
| sex | "m" | "f" | Encoded sex: "m" or "f". |
| youngerThan | integer | Maximum age in years at request time. |
Response fields
| Field | Type | Description |
|---|---|---|
| value | string | The canonical 11-digit AMKA. |
| digits | string | The 11 AMKA digits, identical to `value`. |
| birthDate | string | The encoded birth date, ISO `YYYY-MM-DD`. |
| sex | "m" | "f" | Encoded sex: `m` (odd) or `f` (even) 10th digit. |
Other generators for Greece
Greek AFMGreek companyGreek company nameGreek email addressGreek IBANGreek personGreek person nameGreek product or service offeringGreek vehicle registration plate
See all generators for Greece →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-IdNrHungarian 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