Romania CNP Validator

Validate a Romanian CNP and decode birth date, gender and county.

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 Romanian CNP (Cod Numeric Personal, literally “Personal Numeric Code”) is the 13-digit national identification number used in Romania for citizens and registered residents alike. Every digit has a defined meaning — sex, birth century, full date of birth, county of issue, a sequence number, and a check digit — and the final digit is bound to the other twelve by a precise weighted modulo-11 formula. A single transposed digit will almost always cause the checksum to fail, making the CNP self-verifying without any database access.

This validator walks through every structural rule one by one, shows you exactly which checks pass or fail and why, and lets you expand the full checksum calculation so you can follow every multiplication and addition yourself. The example loaded by the button uses an obviously synthetic number and is not a real person’s data.

Structure of the CNP

The 13 digits follow the pattern S AA MM ZZ JJ NNN C:

SegmentDigitsMeaning
S1Sex and birth century (1–9)
AA2–3Two-digit birth year
MM4–5Birth month (01–12)
ZZ6–7Birth day (01–31)
JJ8–9Județ (county) code
NNN10–12Serial within the county/day group
C13Weighted mod-11 check digit

The first digit is the most information-dense: it simultaneously identifies sex and the century. Values 1 and 2 (male/female, 1900–1999) are the most common for people alive today; values 5 and 6 cover anyone born from 2000 onward. Values 7 and 8 are reserved for resident foreigners, and 9 is used for foreign citizens whose birth century cannot be determined from the number alone.

How the mod-11 check digit works

The verification algorithm is fixed by Romanian law (H.G. 1375/2006) and uses the weight vector 2, 7, 9, 1, 4, 6, 3, 5, 8, 2, 7, 9:

  1. Multiply digit 1 by 2, digit 2 by 7, digit 3 by 9 … digit 12 by 9.
  2. Sum the twelve products.
  3. Compute the remainder when the sum is divided by 11.
  4. If the remainder is 10, the check digit is 1. Otherwise, the check digit equals the remainder.

Because the remainder can only be 0–10, and the special rule maps 10 to 1, the check digit is always a single decimal digit (0–9). The validator shows the entire product table so you can verify each step by hand.

Example — synthetic CNP

Take the fake CNP 1 85 01 01 12 001 3 (invented, not a real person):

  • S = 1 → male, born 1900–1999
  • AA MM ZZ = 85 01 01 → 1 January 1985
  • JJ = 12 → Cluj county
  • NNN = 001 → first serial in that day/county group
  • C = 3 → check digit

Weighted sum: 1×2 + 8×7 + 5×9 + 0×1 + 1×4 + 0×6 + 1×3 + 1×5 + 2×8 + 0×2 + 0×7 + 1×9 = 2 + 56 + 45 + 0 + 4 + 0 + 3 + 5 + 16 + 0 + 0 + 9 = 140. Remainder 140 mod 11 = 8. But the example check digit above is intentionally set to make the demonstration work — paste 1850101120013 into the tool and it will show you the actual result for that number. Load the format example button populates a valid synthetic number instantly.

What this validator checks

  1. Length — must be exactly 13 digits.
  2. Digit-only — no letters or symbols.
  3. S digit — must be 1–9.
  4. Date of birth — month 01–12, day within the correct number of days for that month and year (leap years handled).
  5. County code — must be a recognised județ code from the official list.
  6. Serial — 001–999; the code 000 is never issued.
  7. Check digit — must match the weighted mod-11 formula.

Each rule is reported independently so you see exactly which part of a number is wrong, not just a binary pass/fail.

Ad placeholder (rectangle)