Greece AMKA validator
The AMKA (Αριθμός Μητρώου Κοινωνικής Ασφάλισης — Social Insurance Registry Number) is Greece’s 11-digit national social security identifier. Issued by EFKA (the Unified Social Security Fund), it is mandatory for accessing public healthcare, submitting tax returns, receiving pension benefits, and completing virtually every interaction with Greek public administration. Greek citizens receive an AMKA at birth; EU nationals and third-country residents working or residing in Greece are assigned one upon registration.
The number is compact but information-rich: it embeds the holder’s date of birth, a gender indicator, and a Luhn check digit that lets any software verify the number’s mathematical consistency without querying a remote server. This tool implements the full validation algorithm so you can instantly see whether an AMKA is internally valid and decode every embedded field.
How the format works
An AMKA is always exactly 11 decimal digits arranged as follows:
D D M M Y Y S S S G Q
- DD — day of birth, zero-padded (01–31).
- MM — month of birth, zero-padded (01–12).
- YY — last two digits of the birth year.
- SSSG — four-digit sequential serial number. The last digit G encodes gender: odd = male, even = female. Serial 0001 is the first person registered with that birth date.
- Q — Luhn check digit (standard ISO/IEC 7812 algorithm).
Because only the last two digits of the birth year are stored, the validator infers the century heuristically: two-digit years 00–23 map to 2000–2023, and years 24–99 map to 1924–1999. This covers the entire practical range of living AMKA holders.
The Luhn check-digit algorithm
The Luhn algorithm was designed to detect common transcription errors such as single-digit mistakes and adjacent-digit transpositions.
- Start from the rightmost digit (position 11) and work left.
- Keep every digit in an odd position from the right (positions 1, 3, 5 …) unchanged.
- Double every digit in an even position from the right (positions 2, 4, 6 …).
- If any doubled value exceeds 9, subtract 9 (equivalently, sum its two decimal digits).
- Sum all 11 resulting values.
- The AMKA is valid if and only if the total is divisible by 10.
Worked example — an obviously fake AMKA
Consider the fictional number 15067501237:
| Position | Digit | Action | Result |
|---|---|---|---|
| 1 | 1 | keep | 1 |
| 2 | 5 | ×2 = 10, −9 | 1 |
| 3 | 0 | keep | 0 |
| 4 | 6 | ×2 = 12, −9 | 3 |
| 5 | 7 | keep | 7 |
| 6 | 5 | ×2 = 10, −9 | 1 |
| 7 | 0 | keep | 0 |
| 8 | 1 | ×2 = 2 | 2 |
| 9 | 2 | keep | 2 |
| 10 | 3 | ×2 = 6 | 6 |
| 11 | 7 | keep | 7 |
| Sum | 30 |
30 is divisible by 10, so the Luhn check passes.
Decoding the rest of the number:
| Field | Value | Meaning |
|---|---|---|
| DD | 15 | Day 15 |
| MM | 06 | June |
| YY | 75 | Year suffix 75 → inferred 1975 |
| Serial (SSSG) | 0123 | Serial number; last digit 3 is odd → male |
| Check digit | 7 | Luhn-correct |
This is a made-up number used only to illustrate the algorithm. Do not use it in any real system.
What the validator reports
- Date of birth — the full year inferred from the two-digit YY field, with a flag if the date is not a real calendar date.
- Gender — derived from the parity of the last digit of the serial block.
- Expected vs. given check digit — shows exactly what the Luhn algorithm requires versus what was entered.
- Luhn running total — the complete sum so you can verify each step.
All computation runs locally. No digits, partial inputs, or results are ever sent to a server.