Romania's personal numeric code, introduced in 1978
What a Romanian CNP says, digit by digit
Thirteen digits every Romanian writes on every form: sex and century, date of birth, county, a sequence number and, at the end, a digit calculated from all the others. Type one below, or ask for an example, and read it line by line.
The code
Type the 13 digits. You can paste a code with spaces or dashes too.
- first digit: sex and century
- date of birth: year, month, day
- county code
- sequence number
- check digit
The code you type stays on your device: the page sends it nowhere and keeps none of it. Once loaded, it asks nothing more of the server, so you can switch to flight mode before typing. The share buttons pass on only the last digit.
What else the code gives away
Or build one part by part
Every button changes the code above. The precalculated list shows all 999 codes for the same day, sex and county; press a row to pick it.
The example is chosen so it cannot be anyone's: Bucharest's sector 8 had been abolished in 1979, before 1987.
2870314480452
How the last digit is calculated#
Each of the first twelve digits is multiplied by the digit in the same position of a fixed number, 279146358279. The products are added up, the sum is divided by 11, and the remainder becomes the thirteenth digit. The calculation below runs on the code above and is redone at every change.
The remainder is 10, which does not fit in one digit: it is written as 1.
A remainder after dividing by 11 can be anything from 0 to 10. There is no single digit for ten, so the rule writes 1. The old ten-digit ISBN on books, which divides by 11 in the same way, uses the letter X here; the CNP has no letters, and choosing 1 has two consequences, in the next two chapters.
The rules that define the CNP, approved by Government Decision 1.375/2006, say only that the check digit is "assigned by the computer" and that it "allows the detection of possible errors of substitution or inversion of digits". The constant 279146358279 and the rule for a remainder of 10 are not in the published text. Public CNP validators use them, from encyclopaedias to the code libraries behind online forms.
Why 2 in 11 CNPs end in 1#
For people born between 1900 and 2025 there can be 4,413,597,984 valid codes: every day, every one of the 48 county and sector codes, every sequence number from 001 to 999, for both sexes. Counted exactly, the remainders after dividing by 11 split into eleven parts equal to eight decimal places. The digit 1 gets two of them, remainder 1 and remainder 10, so 18.18% of all codes. Every other digit gets one, 9.09%.
Real codes do not use every sequence number, because few children are born in one county on one day. The share holds: even if sequence numbers stopped at 050, the digit 1 would still come out at 18.18%. Among real CNPs too, 1 should be the last digit twice as often as any other.
Which typos the check digit catches, and which it misses#
The weights 2, 7, 9, 1, 4, 6, 3, 5, 8, 2, 7, 9 have a useful property: a single wrong digit, or two neighbouring digits swapped, among the first twelve always changes the remainder after dividing by 11. If a remainder of 10 had a symbol of its own, like the X in an ISBN, every such error would be caught.
The rule breaks that guarantee in one place. When an error moves the remainder from 1 to 10, or from 10 to 1, the last digit still comes out 1 and the wrong code looks right. This can only happen to codes that end in 1. Try it on the code above:
Press any of the first 12 digits to turn it into the next digit up (9 becomes 0), like a key pressed by mistake.
Of 761,762 simulated typos in 400,000 valid codes, 1.85% of wrong digits and 1.95% of swaps went unnoticed: about one in 53. All of them were in codes ending in 1. For those, one single-digit typo in ten gets through (10.2%). For a CNP ending in any other digit, no error among the first twelve digits gets through.
The county codes: in alphabetical order, with no exceptions#
Codes 01 to 39 follow the counties of 1978 in alphabetical order, from 01 Alba to 39 Vrancea. Wikipedia says the order has "some exceptions". Without diacritics, they would be Brașov (08) before Brăila (09), Satu Mare (30) before Sălaj (31) and Vaslui (37) before Vâlcea (38). But in the Romanian alphabet ă and â come after a, so the list is alphabetical from end to end.
After the counties comes Bucharest: 40 for the city, then 41–46 for sectors 1–6. Codes 47 and 48 belonged to sectors 7 and 8, and 51 and 52 are Călărași and Giurgiu, counties created in 1981.
The county code does not prove the place of birth. The rules say JJ is the code of the county or sector "where the person was born or where they had their domicile or residence when the CNP was given". For someone who got the code as an adult, it can be the county where they lived then. And 51 and 52 appear for nobody who got their code before 1981, even if they were born in Călărași or Giurgiu.
Every county and sector code in the CNP
- 01 Alba
- 02 Arad
- 03 Argeș
- 04 Bacău
- 05 Bihor
- 06 Bistrița-Năsăud
- 07 Botoșani
- 08 Brașov
- 09 Brăila
- 10 Buzău
- 11 Caraș-Severin
- 12 Cluj
- 13 Constanța
- 14 Covasna
- 15 Dâmbovița
- 16 Dolj
- 17 Galați
- 18 Gorj
- 19 Harghita
- 20 Hunedoara
- 21 Ialomița
- 22 Iași
- 23 Ilfov
- 24 Maramureș
- 25 Mehedinți
- 26 Mureș
- 27 Neamț
- 28 Olt
- 29 Prahova
- 30 Satu Mare
- 31 Sălaj
- 32 Sibiu
- 33 Suceava
- 34 Teleorman
- 35 Timiș
- 36 Tulcea
- 37 Vaslui
- 38 Vâlcea
- 39 Vrancea
- 40 Bucharest (no sector)
- 41 Bucharest, Sector 1
- 42 Bucharest, Sector 2
- 43 Bucharest, Sector 3
- 44 Bucharest, Sector 4
- 45 Bucharest, Sector 5
- 46 Bucharest, Sector 6
- 47 Bucharest, Sector 7, abolished in 1979
- 48 Bucharest, Sector 8, abolished in 1979
- 51 Călărași
- 52 Giurgiu
- 70 Any place (since 2024)
Why codes 47 and 48 are missing#
In 1978, when the CNP was introduced, Bucharest had eight sectors. By State Council Decree 284 of 31 July 1979, from 4 August 1979 six remained: sectors 1 and 8 merged into sector 1, sectors 2 and 3 into sector 2, and 4, 5, 6 and 7 became 3, 4, 5 and 6.
After August 1979 there was no sector 7 or 8 left to assign a code to, so 47 and 48 survive only on codes given before then. The people who received them then still carry them: a CNP does not change when the map does.
The same is true, less visibly, of codes 41–46. If they too followed the sector numbers of the time, as 47 and 48 show, a code 44 given before August 1979 means the old sector 4, today's sector 3, and 47 means today's sector 6. The map above shows the sectors as they have been since 1979.
Since 2024, code 70: the county disappears from new CNPs#
On 11 May 2024, Romania's Interior Ministry announced that CNPs generated by the new civil-status computer system "contain the single code 70 for every registration, whatever the county or place where the birth took place". The system started partly on 8 May 2024 and was due to reach the whole country by 24 September 2024. CNPs given before stay as they are, an official of the population-records directorate told the newspaper Adevărul.
For people registered in the new system, digits 8 and 9 say nothing about place. After forty-six years, the geographical part of the code stops with those who received their CNP before the new system reached their office, between May and September 2024.
Where a CNP comes from: lists calculated in advance#
Codes are generated centrally. The rules give the task to the National Centre for the Administration of Population Records Databases (today a directorate of the Interior Ministry), which "issues and distributes the corresponding lists every year" to the county services and to Bucharest's. A newborn's code "is taken from the precalculated lists" and written into the birth certificate.
The sequence number, digits 10–12, is a "sequence number (between 001 and 999), allotted to points of assignment", which tells apart people of the same sex, born on the same day and registered with the same county code. How the 999 numbers are split between the offices of one county is not published.
Are there enough? In 1967, the year with the most births in the Eurostat series (527,764 births), an average of 1,446 children were born each day in the whole country, about half of them boys, so under 800. The 999 numbers of a single county, for one day and one sex, would have covered the boys born in the whole country on an average day that year; in the peak months after Decree 770 there were probably more. In 2025, with 134,238 births (provisional), the average was 368 a day.
The 1978 decree required the code to be "written in identity papers, civil-status records and other personal documents", and children under 14 to be entered in the records "within two years".
Two people with the same CNP#
It happens, and the rules provide for it: they give the same national centre the task of "resolving cases of duplicate or wrong personal numeric codes", and anyone with a wrong or duplicate code gets a new one, with new papers. In 2009 the newspaper Evenimentul Zilei reported on two men with almost identical names who shared a CNP. A records officer in Iași put such cases down to old documents in which the numbers had been written by hand; the article also mentions codes copied wrongly at civil-status offices.
The check digit cannot catch a duplicate. It is calculated from the first twelve digits, so two codes identical up to there always share the thirteenth. It shows that a code is written correctly; whether it was given to someone else, only the register can tell. How many duplicates exist is not published.
What anyone who sees your CNP learns#
Anyone who has your code learns, with no other document, your sex, date of birth and county code: where you were born or where you lived when you got the code. The sequence number says nothing about the person, and the check digit is worked out from the rest.
The other way round, a CNP is easy to guess. Someone who knows your date of birth, sex and county faces at most 999 possibilities, and for a code 70 the date and sex are enough. The code identifies you; as proof that you are the one giving it, it is worth no more than any fact others can find out.
Elsewhere: the American number that also gave away a place#
The United States has a nine-digit Social Security number. According to the Social Security Administration, from 1972 its first three digits, the area number, reflected the state of the mailing address on the application. On 25 June 2011 the administration began assigning numbers at random, saying the change would help protect the integrity of the number and make the nine-digit format last longer.
Romania's code went the same way thirteen years later: code 70 since 2024 does to the county what randomisation did to the American state. Unlike the American number, the CNP still carries the full date of birth.
Method#
The structure of the code is the one in the rules approved by Government Decision 1.375/2006, article 14, read in the text on the official legislation portal. The values 7 and 8 come from the rules approved by Government Decision 1.251/2006, which require them on the residence permit of foreigners granted a form of protection; 7 for men and 8 for women follows Wikipedia. The rule for the check digit (the constant 279146358279, the remainder after dividing by 11, 10 written as 1) is not in these texts; it is the rule public validators use and is presented here as such.
The shares of check digits are computed exactly for all 4,413,597,984 possible codes for the days 1 January 1900 to 31 December 2025, first digits 1, 2, 5 and 6, county codes 01–46, 51 and 52 and sequence numbers 001–999. Typing errors are simulated on 400,000 valid codes chosen at random, one digit replaced by another and one pair of neighbouring digits swapped in each, among the first twelve: 761,762 errors in all.
The alphabetical order of the counties is checked against the Romanian alphabet (a, ă, â, b, …, s, ș, t, ț, …). Births come from the Eurostat demo_gind series for Romania, 1960–2025. The map uses county outlines from geoBoundaries and the Bucharest sectors from OpenStreetMap.
Sources
- State Council Decree 59/1978 (Official Bulletin 15, 4 March 1978)
- Rules approved by Government Decision 1.375/2006, articles 14–15
- Rules approved by Government Decision 1.251/2006 (residence permit, first digit 7 or 8)
- Government Decision 64/2011, annex 80: the 1979 reorganisation of Bucharest's sectors (Decree 284/1979)
- Law 2/1968, republished under Decree 15/1981
- Romanian Interior Ministry, notice on the generation of the CNP, 11 May 2024
- Adevărul, on the 2024 change to CNPs (in Romanian)
- Evenimentul Zilei, "Two Romanians, the same CNP", 19 May 2009 (in Romanian)
- Romanian Wikipedia, "Cod numeric personal (România)": code table and check rule
- Eurostat, demo_gind: live births, Romania
- Social Security Administration, "Social Security Number Randomization" (archived copy)
- geoBoundaries, Romania ADM1; OpenStreetMap (ODbL), Bucharest sectors
Thirteen digits: twelve about you, one about the other twelve.