The Danish Penal Code, also known as the Danish Criminal Code (), is the codification of and the foundation of criminal law in Denmark. The updated official full text covers 29 chapters and is also available online (in Danish).

The Penal Code contains "the most serious and most of the most well-known crimes" while more specialized crimes can be found in subject-specific laws such as the Traffic Act or the Weapons Act. However, serious violations of the rules in subject-specific laws might be independently criminalized in the Penal Code. Certain low-level nuisance crimes are listed in the Public Order Decree.

The Penal Code consists of two parts. The first, consisting of chapters 1–11 (§§ 1–97 c) contains what is generally known as the general part of the criminal law, i.e. the conditions for criminal responsibility, possible punishments and guidelines for metering them out and other rules common to all crimes. The second, consisting of chapters 12–29 (§§ 98–306) contains the crimes themselves.

Penalties 

Possible penalties for violating the Danish penal code are:
 Between 1 and 60 day-fines (§ 51),
 Time-limited prison sentences of between 7 days and 20 years (§ 33), with the possibility of parole after half the time (but at least two months) served (§ 38),
 Imprisonment for life (§ 33), with the possibility of parole after 12 years (§ 41),
 Suspended prison sentence, possibly with up to 6 months not suspended (§ 58), and subject to up to five years of probation (§ 56) and up to 300 hours of community service (§ 63).

Children under the age of 15 are ineligible for punishment (§ 15), and children under the age of 18 cannot be sentenced to life imprisonment (§ 33.2).

Offenders found to be acting irrationally due to a severe mental illness or handicap are always ineligible for punishment, while offenders with diminished responsibility may be ruled ineligible for punishment on a case-by-case basis (§ 16).
Such offenders may, however, be subject to other measures, such as monitoring, psychiatric treatment, or a "placement sentence" of indeterminate length (§ 68).

Particularly dangerous offenders may be given a "custody sentence" of indeterminate length (§ 70).

History
The current Penal Code is law number 126 of April 15, 1930, with later amendments. It came automatically into effect on January 1, 1933, replacing a wide range of previous laws, including the general penalty law of February 10, 1866. Law number 127 of April 15, 1930, describes all previous laws invalidated. It has since been changed or amended a large number of times, especially in the last 15 years, with between 5 and 10 changes each year.

The 1930 Penal Code is based on a series of official reports from 1912, 1917 and 1923.

 (1912) "Betænkning afgiven af Kommissionen nedsat til at foretage et Gennemsyn af den almindelige borgerlige Straffelovgivning" ("Report of the commission that was appointed to perform a review of the ordinary civil penal legislation").
 (1917) "Betænkning angaaende de af den ... nedsatte Straffelovkommission udarbejdede Forslag ... ", udarbejdet af Carl Torp ("Report regarding the proposals drafted by the ... appointed penal code commission ... ", prepared by Carl Torp). 
 (1923) "Betænkning afgiven af Straffelovskommissionen af 9. November 1917" ("Report from the penal code commission of November 9, 1917").

References

Law of Denmark
Criminal codes