North Macedonia EMBG Validator

Validate a Macedonian EMBG and decode birth date, gender and region.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

The EMBG (Македонски: Единствен матичен број на граѓанинот, romanised as Edinstven matichen broj na graganinot) is the 13-digit Unique Master Citizen Number used in North Macedonia. Every citizen and permanent resident receives one at birth or upon registration, and it appears on identity cards, passports, tax documents, health records, and any official government interaction. Despite the country’s name change in 2019, the number format and algorithm are unchanged from the Yugoslav-era JMBG (Jugoslovenski matični broj građana) specification introduced in 1976 and updated in 1981.

This tool validates a North Macedonia EMBG end-to-end — it does not just check the digit count, it runs every structural rule the civil registry enforces: digit composition, length, a genuine calendar date in positions 1-7, a recognised North Macedonian region code in positions 8-9, and the exact weighted-sum checksum in position 13. On a valid number it also decodes the birth date, the birth year from its compact three-digit encoding, the holder’s gender, and the statistical region of registration.

How it works

The 13-digit EMBG follows the layout DD MM YYY RR BBB C:

FieldPositionsMeaning
DD1-2Day of birth (01-31)
MM3-4Month of birth (01-12)
YYY5-7Last three digits of the birth year
RR8-9Statistical / political region code
BBB10-12Birth-order serial within the day-region group
C13Checksum digit

Year decoding. Because only three digits are available for the year, the standard convention is: YYY ≥ 500 → full year = 1000 + YYY; YYY below 500 → full year = 2000 + YYY. So 990 decodes to 1990 and 005 decodes to 2005. This convention is shared across all countries that use the JMBG system (North Macedonia, Serbia, Montenegro, Bosnia and Herzegovina, Kosovo, Slovenia).

Gender from BBB. The three-digit birth-order serial is odd for males and even for females — the same convention as the Bulgarian EGN, Romanian CNP, and other ex-Yugoslav identifiers.

Checksum algorithm. The digits are grouped into six pairs: positions (1, 7), (2, 8), (3, 9), (4, 10), (5, 11), (6, 12). Each pair sum is multiplied by a weight decreasing from 7 to 2:

sum = 7×(d1+d7) + 6×(d2+d8) + 5×(d3+d9) + 4×(d4+d10) + 3×(d5+d11) + 2×(d6+d12)

The weighted sum is reduced modulo 11, then subtracted from 11 to give m:

  • m = 1-9 → check digit = m
  • m = 11 → check digit = 0 (the case where sum mod 11 = 0)
  • m = 10 → the combination is structurally unissuable; the registry skips it

Worked example

Take the obviously fictional EMBG 0101990410012:

SegmentDigitsDecoded
DD01Day 1
MM01January
YYY9901990 (990 >= 500, so 1000 + 990)
RR41Western North Macedonia
BBB001Serial 1, odd → Male
C2Checksum digit

Checksum verification:

Pair (d1+d7): 0+0 = 0,  weight 7 → 0
Pair (d2+d8): 1+4 = 5,  weight 6 → 30
Pair (d3+d9): 0+1 = 1,  weight 5 → 5
Pair (d4+d10): 1+0 = 1, weight 4 → 4
Pair (d5+d11): 9+0 = 9, weight 3 → 27
Pair (d6+d12): 9+1 = 10, weight 2 → 20

sum = 0 + 30 + 5 + 4 + 27 + 20 = 86
86 mod 11 = 9
m = 11 − 9 = 2  → check digit = 2  ✓

The check digit in position 13 is 2, which matches the calculation, so the EMBG is structurally valid.

Formula note

The algorithm is identical to the JMBG checksum used in all successor states of Yugoslavia. Note that the positional pairing — not a sequential weighting — is what makes it distinct from simpler Luhn-style checks. The first half of the EMBG (positions 1-6) always forms pairs with the second half (positions 7-12), and the six resulting pair sums are then weighted in descending order before summation. The one edge case to remember is that m = 10 signals a structurally impossible number rather than a simple mismatch; the registry never assigns birth-order serials that would produce this outcome.

Ad placeholder (rectangle)