A criminal code or penal code is a document that compiles all, or a significant amount of, a particular jurisdiction's criminal law. Typically a criminal code will contain offences that are recognised in the jurisdiction, penalties that might be imposed for these offences, and some general provisions (such as definitions and prohibitions on retroactive prosecution).
Criminal codes are relatively common in civil law jurisdictions, which tend to build legal systems around codes and principles which are relatively abstract and apply them on a case-by-case basis. Conversely they are not as common in common law jurisdictions. Where a jurisdiction is a federation, the subnational units of such jurisdiction may or may not use separate penal codes. For example, in India, the entire country (the federal government, states, and union territories) all operate under one criminal code, the Bharatiya Nyaya Sanhita, and in Canada the process is roughly the same, with the entire country being subject to a single criminal code. However, in Australia, the federal government and the states operate under different criminal codes (for instance, New South Wales would not necessarily use the federal criminal code, but rather, its own criminal code.)