A Croatian vanity car plate which reads "I'm bloggin'" shown over a series of maps and charts.
Last updated on

The Curious Case of Croatian Car Codes


A few days ago, I was stuck in a very bad traffic jam, and as I was starting to get quite bored with looking at the slowly-moving cars in front of me, I began thinking about the Croatian license plate system. You see, Croatian cars, motorcycles, and other vehicles typically have a license plate in the format of a two-letter town code, followed by three or four digits, followed by one or two letters. Besides the typical license plates, you can also pay for a custom license plate, but that’s another topic.

Typical license plates

There are ten digits and 22 letters available for the license plate (30 letters in the Croatian alphabet, minus Č, Ć, Dž, Đ, Lj, Nj, Š, Ž), so we can calculate how many combinations there are:

  • 3 digits and one letter -> 10∗10∗10∗22=22,00010*10*10*22 = 22,000
  • 4 digits and one letter -> 10∗10∗10∗10∗22=220,00010*10*10*10*22 = 220,000
  • 3 digits and two letters -> 10∗10∗10∗22∗22=484,00010*10*10*22*22 = 484,000
  • 4 digits and two letters -> 10∗10∗10∗10∗22∗22=4,840,00010*10*10*10*22*22 = 4,840,000

So in total, there are 22,000+220,000+484,000+4,840,000=5,566,00022,000 + 220,000 + 484,000 + 4,840,000 = 5,566,000 available typical license plates for each town code. Although there are a 128 towns in Croatia, there are only 34 license plate town codes, so there is 34∗5,566,000=189,244,00034 * 5,566,000 = 189,244,000 total possible license plates.

An example Croatian car plate
An example Croatian car plate | Source

Zagreb, Split, Pula

What I noticed, though, during the longest 6-kilometer drive of my life, is that some towns are still using three digits, and some have already moved to four. For example, Zagreb (ZG) has been using the 4-digit plates for quite some time now, and Split (ST) and Pula (PU) have started using them only recently. After going through this chain of thoughts, I had questions:

  • What is the largest town without a dedicated town code?
  • What is the smallest town with a dedicated town code?
  • Which license plate covers the largest/smallest population?
  • And many more…

Gathering the data

Obviously, when I finally came home a few hours later, I picked up a license plate to town/municipality table from this Wikipedia article, cleaned it up a bit with some Python code, added a few missing entries, and I had something like this:

{
  "VT": {
    "mainTown": "Virovitica",
    "towns": ["Virovitica"],
    "municipalities": [
      "Gradina",
      "Lukač",
      "Pitomača",
      "Suhopolje",
      "Špišić Bukovica"
    ]
  }
}

The other step was to gain the latest census data. Luckily, the Croatian Bureau of Statistics got me covered. I extracted the data, cleaned it up manually so the names match (e.g., some towns and municipalities in Istria have both the Croatian and Italian names in the census, and only the Croatian name in the license plate data), and converted it to a format like this:

{
  "Šibenik": {
    "county": "Šibenik-Knin",
    "unit_type": "Town",
    "total_population": 42599
  },
  "Vodice": {
    "county": "Šibenik-Knin",
    "unit_type": "Town",
    "total_population": 8649
  },
  "Bilice": {
    "county": "Šibenik-Knin",
    "unit_type": "Municipality",
    "total_population": 2546
  }
}

Note: Since there are a few towns and municipalities with the same names, I added a county abbreviation to those names so the names would become unique. For example, Sveta Nedelja - IS for the municipality in Istria, and Sveta Nedelja - ZG for the town in the Zagreb county.

Cool statistics

Now all I needed were a few scripts, and I could answer my questions!

Largest towns without a town code

By taking the population of all towns that are not the main town, I answered my first question:

Largest towns without their own town code

Population, 2021 census

020K40K60K61,075Velika Gorica37,794Kaštela37,435Samobor24,862Solin24,133ZaprešićSinjPetrinjaSveta NedeljaDugo SeloPoreč
Show the data
TownPopulationTown code
Velika Gorica61,075ZG
Kaštela37,794ST
Samobor37,435ZG
Solin24,862ST
Zaprešić24,133ZG
Sinj23,452ST
Petrinja19,950SK
Sveta Nedelja - ZG18,221ZG
Dugo Selo17,676ZG
Poreč16,607PU

As we can see, Velika Gorica takes the lead with 61,075, followed by Kaštela (37,794), Samobor (37,435), Solin (24,862), and Zaprešić (24,133).

Smallest towns with a town code

By taking the population of all main towns, I answered the second question:

Population of each town code's main town

2021 census

0200K400K600K800K767.1KZGSTRIOSZDPUSBKAVŽŠIDUSKBJVKKCČKDJVUPŽKTVTKŽNAMAOGNGKRSLGSDAIMŽUBM5.1KDE
Show the data
CodeMain townPopulation
ZGZagreb767,131
STSplit160,577
RIRijeka107,964
OSOsijek96,313
ZDZadar70,779
PUPula52,220
SBSlavonski Brod49,891
KAKarlovac49,377
VŽVaraždin43,782
ŠIŠibenik42,599
DUDubrovnik41,562
SKSisak40,121
BJBjelovar36,316
VKVinkovci30,842
KCKoprivnica28,580
ČKČakovec27,122
DJĐakovo23,577
VUVukovar23,175
PŽPožega22,294
KTKutina19,601
VTVirovitica19,302
KŽKriževci18,949
NANašice14,291
MAMakarska13,301
OGOgulin12,246
NGNova Gradiška11,690
KRKrapina11,530
SLSlatina11,503
GSGospić11,502
DADaruvar10,105
IMImotski9,153
ŽUŽupanja9,153
BMBeli Manastir7,973
DEDelnice5,135

This chart tells us that Delnice is the smallest main town with just 5,135 people, followed by Beli Manastir (7,973), Županja (9,153), Imotski (9,153), and Daruvar (10,105). Interestingly enough, we also found out that Županja and Imotski have the same population.

License plate population coverage

By taking the sum of populations of all towns and municipalities belonging to a specific license plate town code, I answered the third question:

Population covered by each town code

All towns and municipalities that register under the code, 2021 census

0250K500K750K1M1.3M1.1MZGSTRIPUZDVŽOSKRDUČKŠISBKASKBJKCVKPŽKTGSVUNAVTDJDANGŽUBMKŽMASLIMOG15.1KDE
Show the data
CodeMain townPopulation
ZGZagreb1,067,116
STSplit368,992
RIRijeka250,341
PUPula195,237
ZDZadar159,766
VŽVaraždin159,487
OSOsijek145,412
KRKrapina120,702
DUDubrovnik115,564
ČKČakovec105,250
ŠIŠibenik96,381
SBSlavonski Brod94,318
KAKarlovac93,412
SKSisak91,961
BJBjelovar75,740
KCKoprivnica71,274
VKVinkovci69,074
PŽPožega51,871
KTKutina47,642
GSGospić42,748
VUVukovar42,633
NANašice42,447
VTVirovitica41,907
DJĐakovo39,385
DADaruvar38,352
NGNova Gradiška35,949
ŽUŽupanja31,406
BMBeli Manastir30,782
KŽKriževci29,947
MAMakarska29,668
SLSlatina28,461
IMImotski24,747
OGOgulin18,783
DEDelnice15,078

In this chart, we can see that the leader is the ZG code with 1,067,116 people, followed by ST (368,992), and RI (250,341). On the other end, DE is the smallest code with 15,078 people, followed by OG (18,783), and IM (24,747).

Percentage of license plate population coverage covered by the main town

This one is my favourite — dividing the main town population by the total population of the license plate, we get some interesting statistics:

Share of each town code's population living in its main town

0%20%40%60%80%72%ZGOSOGKŽDJVUSBKABJVTMAVKZDŠISKSTRIPŽKTSLKCIMDUDENANGŽUVŽGSPUDABMČK10%KR
Show the data
CodeMain townMain town shareMain town populationCode population
ZGZagreb71.89%767,1311,067,116
OSOsijek66.23%96,313145,412
OGOgulin65.20%12,24618,783
KŽKriževci63.28%18,94929,947
DJĐakovo59.86%23,57739,385
VUVukovar54.36%23,17542,633
SBSlavonski Brod52.90%49,89194,318
KAKarlovac52.86%49,37793,412
BJBjelovar47.95%36,31675,740
VTVirovitica46.06%19,30241,907
MAMakarska44.83%13,30129,668
VKVinkovci44.65%30,84269,074
ZDZadar44.30%70,779159,766
ŠIŠibenik44.20%42,59996,381
SKSisak43.63%40,12191,961
STSplit43.52%160,577368,992
RIRijeka43.13%107,964250,341
PŽPožega42.98%22,29451,871
KTKutina41.14%19,60147,642
SLSlatina40.42%11,50328,461
KCKoprivnica40.10%28,58071,274
IMImotski36.99%9,15324,747
DUDubrovnik35.96%41,562115,564
DEDelnice34.06%5,13515,078
NANašice33.67%14,29142,447
NGNova Gradiška32.52%11,69035,949
ŽUŽupanja29.14%9,15331,406
VŽVaraždin27.45%43,782159,487
GSGospić26.91%11,50242,748
PUPula26.75%52,220195,237
DADaruvar26.35%10,10538,352
BMBeli Manastir25.90%7,97330,782
ČKČakovec25.77%27,122105,250
KRKrapina9.55%11,530120,702

This means that 71.89% of people eligible for the ZG license plate live in Zagreb, but only 9.55% eligible for the KR license plate live in Krapina! Zagreb is huge compared to its neighbours, so it’s no surprise it has such a high percentage. Krapina, on the other hand, shares the town code with 6 towns of similar size and 25 municipalities.

License plates by number of towns and municipalities

This one is also interesting — by taking the sum of municipalities and towns array lengths, we get to see how “distributed” the code is:

Towns and municipalities under each town code

  • Towns
  • Municipalities
01020304041PU39ST35ZGZDKRRIVŽČKDUŠIKCKASBBJSKVKGSOSNANGSLDJDAVUBMIMŽUPŽDEMA6KTVTKŽ5OG
Show the data
CodeMain townTownsMunicipalitiesTotal
PUPula103141
STSplit132639
ZGZagreb102535
ZDZadar62834
KRKrapina72532
RIRijeka121628
VŽVaraždin62228
ČKČakovec32225
DUDubrovnik51722
ŠIŠibenik51520
KCKoprivnica21820
KAKarlovac41317
SBSlavonski Brod11617
BJBjelovar31316
SKSisak4913
VKVinkovci21113
GSGospić4812
OSOsijek3912
NANašice2911
NGNova Gradiška11011
SLSlatina2810
DJĐakovo1910
DADaruvar459
VUVukovar279
BMBeli Manastir189
IMImotski189
ŽUŽupanja189
PŽPožega358
DEDelnice268
MAMakarska257
KTKutina336
VTVirovitica156
KŽKriževci145
OGOgulin145

The PU code takes the lead with 41 towns and municipalities, followed by ST (39) and ZG (35). On the bottom, we have KŽ (5), OG (5), and KT (6).

Let’s talk maps

This was all fun, but it didn’t provide me with a visual understanding of the distribution of the town codes. I wanted to see the shapes, the borders, the colors! So, as one does, I found this XML file which included a link to this ZIP file with the GIS data of all Croatian administrative units (country, counties, towns, municipalities, villages, etc). After a brief consultation with Chat GPT, I now considered myself an expert in QGIS, and I extracted the town and municipality data from this file.

A map of Croatia with town and municipality borders

After cleaning up the names of the towns and municipalities to match the names in other files (Title Case instead of UPPER CASE, removing Italian names, adding diacritics, etc.), I was able to add a plate property to each feature of the map. Then, using the Dissolve process in QGIS, I was able to join the towns and municipalities with the same license plate town code, and color them accordingly. Using the Centroids modifier, I created labels for each license plate area. This is the result:

A labeled map of Croatia divided by the license plate town codes

As you can see, some codes like ZG and GS cover huge areas, and others like IM and MA cover very small areas. We can also see that the RI code area is split in two parts by the DE and OG areas.

In QGIS, it’s fairly easy to add the area in square kilometers to the feature properties, so after doing that, we can show a heatmap with the area of each town code:

A heatmap showing the areas in square kilometers for each town code

Similarly, we can create a heatmap with the population of each town code:

A heatmap showing the population for each town code

These maps provided me with much more insights than the raw numbers; for example, one might argue that the creation of the IM code was useless, because now both MA and IM have very small areas and very small populations.

A similar case could be made about DE and OG codes. As we already mentioned, the RI code area is split into two pieces by the DE and OG code areas. There is probably a better way to handle this, especially considering the low populations of the DE and OG areas.

One last map - Voronoi diagrams

I had one more fun idea — what would the map look like if we didn’t care about the municipality borders, but instead everyone registered their vehicle with the code of the nearest town? To find out what this would look like, we can use Voronoi diagrams. Voronoi diagrams are a way of partitioning an area into regions where each region contains all of the points that share the closest site of a finite set of points. In our case, the area is Croatia, and the finite set of points is the set of our main towns.

In QGIS, this is also fairly simple. We can find the centroids of each of our main towns with the Centroids process, then find the regions using the Voronoi polygons process, and finally clip the result to the polygons representing the borders of Croatia. Here’s the final result:

A Voronoi diagram of the main towns

Although this way of dividing the town codes is probably not a good idea, it is fun to see the difference from the real map. The borders in continental Croatia didn’t move much, but the ones on the coast moved a lot.

Notes

There are a few important things to note:

  • Population is probably not a good measure for the usefulness of a license plate town code. A better measure would be the number of registered cars per year, per town code. However, I could not find this data; I could only find the data for the entire country.
  • In 2015, there was an attempt to have all 128 towns have their own town codes, but after a lot of disagreement from different towns, it ultimately failed, and the same system was kept.

Sources

  • Car plate data was taken from this Wikipedia article and its sources
  • Census data was taken from here
  • Map data was taken from DGU — I had to really dig through some of these XML to find the data… It has all of the data I needed, but it’s not structured very well.
  • I used QGIS for the maps.

Update Oct 29th 2026: I made the charts interactive.