Territorial unit code format differs in each territorial unit layout.

In view by NUTS classification it has structure:

000000000000- total 12 characters
1.2.3.4.5.6.
where number denote:
1. Macroregion symbol (01,.., 07) - two characters
2. Voivodship symbol (00, 02, ..., 32)- two characters
3. Region symbol (1,2)- one character
4. Subregion symbol (00, 01, ..., 73)- two characters
5. Powiat symbol (00, 01, ..., 59 - powiats; 60, ..., 99 - cities with powiat status)- two characters
6. Symbol of gmina/part of the gmina (000......, where the last character is unit type symbol) - three characters

and in view by TERYT register:

0000000- total 7 characters
1.2.3.
where number denote:
1. Voivodeship symbol (00, 02, ..., 32)- two characters
2. Powiat symbol (00, 01, ..., 59 - powiats; 60, ..., 99 - cities with powiat status)- two characters
3. Symbol of gmina/part of the gmina (000......, where the last character is unit type symbol) - three characters