History

Code of Hammurabi

Akkadian: dīnāt mīšarim (“judgments of justice”)

c. 1754 BCE · Babylon

In one sentence

The Code of Hammurabi is a list of about 280 rules for judging cases that King Hammurabi of Babylon had carved on a tall black stone almost 3,800 years ago, to show that he was a fair and just king.

Code of Hammurabi
Image: Mbzt · CC BY 3.0 · Wikimedia Commons

Start at the top for an easy introduction. Go further down for more detail and scholarship.

  • Easy
  • Intermediate
  • Advanced

For young readers

Imagine a stone taller than a grown-up, dark and smooth, covered from top to bottom with tiny wedge-shaped marks. That is the Code of Hammurabi. The marks are cuneiform, one of the oldest kinds of writing in the world, and the words are in Akkadian, the language spoken in Babylon, a great city in what is now Iraq.

At the very top there is a picture carved in the stone. King Hammurabi stands with his hand raised to his face, as if he is respectfully listening. In front of him sits Shamash, the sun god, who was also the god of justice. The Babylonians believed that the sun sees everything, so the sun god knew who was telling the truth.

Below the picture come the rules. Many of them sound like this: “If someone does this, then this must happen to him.” There are rules about stealing, about farming and watering fields, about renting an ox, about marriage and children, about doctors and builders, and about hurting other people.

Some rules seem very harsh to us. One says that if a man knocks out the eye of another man of the same rank, his own eye should be knocked out. People often call this “an eye for an eye”. But the rules were not the same for everyone: rich free people, ordinary people and enslaved people were treated differently.

The king wrote that he made these rules so that “the strong should not oppress the weak” and so that widows and orphans would be treated fairly. Long after Hammurabi died, children learning to be scribes still copied his words at school, and today his stone stands in the Louvre Museum in Paris.

At a glance

Date
c. 1754 BCE, late in the reign of Hammurabi of Babylon (c. 1792–1750 BCE, middle chronology)
Place
Composed in Babylon; the surviving stele was probably set up in the city of Sippar and was later carried to Susa (south-western Iran)
Language and script
Old Babylonian Akkadian, in a deliberately old-fashioned monumental cuneiform
Object
Basalt stele about 2.25 m high, with a relief of Hammurabi before the sun god Shamash; Louvre Museum, Paris (Sb 8)
Contents
A poetic prologue, 282 “laws” as numbered by modern scholars, and a poetic epilogue; about 4,130 lines of text
Discovery
Excavated at Susa in 1901–1902 by the French mission led by Jacques de Morgan; first published by Jean-Vincent Scheil in 1902
Other copies
More than 50 manuscripts on clay tablets and other stone fragments, copied for over a thousand years
Significance
The longest and best-preserved law collection of the ancient Near East and a key source for Mesopotamian society and ideas of kingship

Easy

What is the Code of Hammurabi?

The Code of Hammurabi is a collection of legal rulings issued in the name of Hammurabi, the sixth king of the First Dynasty of Babylon, who reigned in the eighteenth century BCE. It is best known from a single, beautifully carved stone monument, or stele, now in the Louvre Museum in Paris. The stele is made of a dark, hard stone (basalt), stands about 2.25 metres high, and is covered on both sides with columns of cuneiform text.

The text has three parts. A long prologue, written in elevated poetic language, praises Hammurabi as a king chosen by the gods and lists the cities and temples he cared for. Then come the rules themselves, which modern scholars have divided into 282 numbered paragraphs (the numbers are not on the stone). Finally an epilogue explains why the king set up the monument and calls down curses on any future ruler who damages or changes it.

The word “code” was given to the text by its first modern editor, and it can be misleading. A modern law code tries to cover every area of life and is applied by courts. Hammurabi’s text is selective, leaves out many ordinary situations, and is almost never cited in the thousands of surviving Babylonian court records and contracts. What it actually was, and how it was used, is one of the most interesting questions about it.

Even so, it is one of the most important documents to survive from the ancient world. It gives us a detailed picture of daily life in Babylonia nearly 4,000 years ago: how families were organised, how fields were rented, how debts were paid, what doctors and builders were responsible for, and how people of different social ranks were treated.

[1][4][6]

Easy

How to “read” the stele

The top of the stele carries a relief sculpture. On the left stands Hammurabi, wearing a round cap with a broad brim and a long robe. He raises his right hand to his mouth, a gesture of prayer or respect. Facing him sits the god Shamash on a throne shaped like a temple façade, with his feet resting on stylised mountains. Flames or rays rise from his shoulders, showing that he is the sun god. He holds out a rod and a ring, symbols of divine authority and perhaps of measuring and justice.

The picture is often described as Shamash “giving” the laws to Hammurabi, but scholars read it in slightly different ways. The text itself never says that the god dictated the laws. Rather, Hammurabi claims that the gods gave him kingship and the duty to establish justice, and that he then wrote down his own just judgments. The relief shows the king in the god’s presence, receiving the authority to rule justly.

Below the relief the text runs in horizontal bands of columns. The script was already old-fashioned when the stele was carved: the scribes used archaic sign forms and wrote the columns in a traditional orientation, to give the monument an air of dignity and antiquity, somewhat like carving a modern inscription in Roman capitals.

Part of the front of the stele is smooth and empty. Several columns of text were polished away in antiquity, almost certainly so that a later king could add his own inscription, which was never carved. The missing laws are partly known from other copies on clay tablets.

[4][1]

Easy

What the laws say

Almost all the rules follow the same pattern: “If a man does X, then Y shall happen.” Scholars call this form “casuistic” (case-based) law. The rules are arranged roughly by topic, though not always in an order a modern reader would expect.

The first laws deal with justice itself: false accusations, witnesses who lie, and a judge who changes a decision after it has been sealed. Next come theft and robbery, followed by rules about soldiers and state land, farming, irrigation, orchards, houses and trade. A large group concerns family life: betrothal and marriage gifts, divorce, the rights of wives, widows and children, adoption and inheritance. Later sections deal with injuries to the body, the fees and liabilities of doctors and builders, the hiring of boats, oxen and workers, and finally the sale of slaves.

Some laws are strikingly detailed. A builder whose house collapses and kills the owner is to be put to death. A surgeon who successfully treats a patient receives a fee that depends on the patient’s rank, but a surgeon whose operation kills a free man is to have his hand cut off. A person who fails to maintain the dyke of his field, so that water floods his neighbours’ land, must pay for the lost grain. A man forced to sell his wife or children into debt service must see them released in the fourth year.

Some provisions protect weaker people. A wife whose husband is captured in war and who has nothing to live on may live with another man without being punished. A man who divorces a wife who has borne him children must return her dowry and give her a share of property to raise them. At the same time the laws accept slavery, punish some crimes with death by drowning or burning, and give women fewer rights than men.

[5][1][6]

Intermediate

“An eye for an eye” and a society of ranks

The most famous laws are those based on retaliation, often called by the Latin phrase lex talionis. If a man destroys the eye of an awīlum (a free man of full status), his own eye shall be destroyed; if he breaks another man’s bone, his bone shall be broken; if he knocks out the tooth of a man of his own rank, his own tooth shall be knocked out. Earlier Mesopotamian law collections, such as the laws attributed to Ur-Namma of Ur, usually required money compensation for bodily injuries, so the stronger emphasis on physical retaliation in Hammurabi’s laws is notable.

Retaliation, however, applied only between equals. If the victim was a muškēnum, a free person of lower or dependent status (the exact meaning of the term is debated), the offender paid one mina of silver instead. If the victim was the slave of another man, the offender paid half the slave’s value, as compensation to the owner. The laws thus recognise three broad categories: the awīlum, the muškēnum and the wardum (male slave) or amtum (female slave).

This graded system shows that Babylonian justice was not based on equality before the law. Punishments and fees depended on the status of both offender and victim, and on gender and family position. Historians use these differences as evidence for the social structure of the Old Babylonian period, while recognising that the laws present an ideal picture rather than a census of society.

The principle of retaliation may seem cruel, but some scholars point out that it also set a limit: the punishment should match the injury, not exceed it. Similar formulations appear later in the Hebrew Bible (for example Exodus 21:23–25), which suggests that they belonged to a widespread legal tradition in the ancient Near East.

[1][5][6]

Intermediate

Hammurabi and the Old Babylonian world

Hammurabi belonged to an Amorite dynasty that ruled the city of Babylon on the Euphrates. When he came to the throne around 1792 BCE (in the widely used “middle chronology”; other chronologies shift these dates by several decades), Babylon was one of several competing kingdoms in Mesopotamia, alongside Larsa in the south, Eshnunna to the east, Mari on the middle Euphrates and the Upper Mesopotamian kingdom founded by Shamshi-Adad.

For most of his reign Hammurabi worked through diplomacy and alliances; letters found at Mari show a world of constant negotiation among kings. In the last part of his reign he defeated Rim-Sin of Larsa (around 1763 BCE), then Eshnunna and Mari, and brought most of southern and central Mesopotamia under Babylonian rule. The prologue of the Code lists many of these cities as places whose gods and people Hammurabi had cared for, which helps date the text to the final years of his reign, around 1755–1750 BCE.

Hammurabi presented himself as a “shepherd” of his people and a king of justice. Mesopotamian rulers had long been expected to establish kittum and mīšarum, “truth” and “equity”. In practice this included issuing decrees that cancelled certain debts and freed people from debt slavery. The Code belongs to this ideal: it shows the king as the guardian of fairness under the gods.

Hammurabi’s empire did not last long. Under his son Samsu-iluna the south broke away, and in 1595 BCE (middle chronology) a Hittite raid ended the First Dynasty of Babylon. But the prestige of Hammurabi and his laws endured for many centuries.

[2][7]

Intermediate

Copies, plunder and rediscovery

The stele in the Louvre was probably not the only one. Its text mentions Esagil, the temple of Marduk in Babylon, and scholars think copies were set up in several cities. According to the Louvre, the surviving stele was originally erected in Sippar, the city of the sun god Shamash. Fragments of at least one other stone copy have been found.

In the twelfth century BCE the Elamite king Shutruk-Nahhunte raided Babylonia and carried off famous monuments as trophies to his capital, Susa, in what is now south-western Iran. The stele of Hammurabi was probably among them, together with other Mesopotamian monuments such as the victory stele of Naram-Sin. The erased columns on the front were most likely prepared for an Elamite inscription recording this capture.

The text also survived on clay. More than 50 manuscripts are known, from the Old Babylonian period down to the Neo-Assyrian and Neo-Babylonian periods, a span of more than a thousand years. The laws and especially the prologue and epilogue were copied by scribes in training and kept in libraries such as that of the Assyrian king Ashurbanipal at Nineveh. Some later tablets even add commentaries or translations.

In the winter of 1901–1902 the French archaeological mission at Susa, directed by Jacques de Morgan, found the stele broken into three pieces. The Assyriologist Jean-Vincent Scheil published and translated it within months, in 1902. The discovery caused a sensation in Europe, not least because the laws were older than the laws of Moses and resembled them in some ways.

[4][1]

Intermediate

Before and after: a tradition of law collections

When it was discovered, the Code of Hammurabi was hailed as the oldest law code in the world. Later discoveries showed that it belonged to an older tradition. The laws of Ur-Namma (Sumerian, around 2100 BCE), of Lipit-Ishtar of Isin (Sumerian, twentieth century BCE) and of the city of Eshnunna (Akkadian, somewhat earlier than Hammurabi) share its structure of prologue, case-based rules and epilogue, and several of its topics.

Later Near Eastern law collections, such as the Middle Assyrian laws and the Hittite laws, continued the same basic form. The legal sections of the Hebrew Bible, especially the Covenant Code in Exodus 21–23, also resemble Hammurabi’s laws in both form and content. A famous example is the case of an ox that gores a person: both texts distinguish between an ox that had not previously been known to gore and one whose owner had been warned.

Most scholars explain these similarities not as direct copying from Hammurabi’s stele but as the result of a shared scribal and legal culture across the ancient Near East, in which certain model cases and ways of reasoning were widely known. Others argue that biblical writers in the first millennium BCE may have known Mesopotamian texts more directly, perhaps through Neo-Assyrian scribal education. The question remains open.

In the modern world Hammurabi has become a symbol of the rule of law. His portrait appears among great lawgivers in the chamber of the United States House of Representatives, and copies of the stele stand in several places, including United Nations Headquarters in New York.

[1][6]

Intermediate

The prologue and epilogue: law as royal propaganda and piety

Readers often skip the poetic frame, but it is essential for understanding the text. The prologue opens in the time of the gods, when Anu and Enlil gave Marduk, the god of Babylon, supremacy and called Hammurabi by name “to make justice appear in the land, to destroy the wicked and the evil, so that the strong should not oppress the weak”. It then lists more than twenty cities and their temples, presenting Hammurabi as their benefactor.

The epilogue explains that Hammurabi set up his stele before his statue as “king of justice” so that any wronged man could come, have the inscription read to him, understand his case and find relief. It praises the king as a shepherd who protected his land, and it ends with long curses on any future ruler who ignores, alters or erases the words, calling on each of the great gods in turn.

The frame shows that the monument was not simply a legal reference work. It was also a public statement of royal legitimacy addressed to the gods, to Hammurabi’s subjects and to future kings. By recording his just decisions in permanent stone, the king proved that he had fulfilled the duty the gods had given him.

The prologue and epilogue were also valued as literature. Their style became a model of fine Babylonian, and they were among the passages most often copied in scribal schools of later periods.

[5][6][7]

Advanced

Debate: legislation, jurisprudence or royal monument?

Early twentieth-century scholars treated the text as legislation in the modern sense: a statute book binding on judges. This view ran into a major difficulty. Thousands of Old Babylonian contracts, letters and records of lawsuits survive, yet they almost never refer to the Code, and in some cases practice seems to differ from its rules. There is also no evidence that judges were required to consult it.

In an influential article of 1960 the Assyriologist F. R. Kraus argued that the laws are better understood as a collection of exemplary judgments, a form of jurisprudence, rather than legislation. Jean Bottéro later compared the laws to the Mesopotamian “science” of lists, such as omen collections and medical texts, which also use the “if … then …” form: the laws were model cases illustrating principles, organised in variations (a free man, a commoner, a slave; a first offence, a repeat offence), rather than rules to be applied mechanically.

Other scholars stress different aspects. Raymond Westbrook argued that such collections could serve as reference works for judges and belonged to a common legal tradition. Martha Roth and others emphasise the monumental and political nature of the stele, as a statement of royal ideology meant to be seen as much as read. Marc Van De Mieroop has highlighted how the text fits into Hammurabi’s broader self-presentation after his conquests.

Most current specialists would combine these views: the Code reflects real legal practice and problems, reformulated by scholars into model cases, and displayed on monuments as proof of the king’s justice. Its authority was moral and ideological more than procedural. The debate illustrates the danger of reading ancient texts through modern categories such as “code” or “statute”.

[1][6][7]

Advanced

Evidence, text and interpretation

The text of the Code is reconstructed from two kinds of evidence: the Louvre stele, which is the fullest witness but lacks the erased columns, and the clay-tablet manuscripts, which fill most of the gap and show variants. The paragraph numbering, introduced by Scheil in 1902, has been kept for convenience, although the stele itself does not divide the laws in this way and the laws in the gap are numbered with letters in some editions.

Translating the laws is not straightforward. Key social terms such as muškēnum have no exact modern equivalents and have been rendered as “commoner”, “palace dependant” or “villein”. Legal terms and units of measure also require careful comparison with contemporary documents. Standard modern English translations, such as Martha Roth’s in Law Collections from Mesopotamia and Asia Minor, provide the basis for most scholarship; older translations such as L. W. King’s (1910), widely available online, are useful but outdated in places.

Historians must also read the laws against other sources: letters of Hammurabi to his officials in Larsa, which show him intervening in disputes over land and irrigation; court records from Sippar and other cities; and royal decrees cancelling debts. These documents reveal a working legal system of judges, witnesses, oaths and river ordeals, in which the Code seems to have functioned as an ideal reference point rather than a rulebook.

Finally, the chronology of Hammurabi’s reign depends on the unresolved question of Mesopotamian absolute chronology. The dates used here follow the “middle chronology”; the “low” and “high” chronologies place his reign decades later or earlier. Relative dating, however, is secure: the Code belongs to the last years of his reign, after the conquest of Larsa and Mari.

[1][5][6][2]

Key ideas

Casuistic law
Rules written as specific cases in the form “If a man does X, then Y”, rather than as general principles.
Lex talionis
The principle of retaliation, “an eye for an eye”, which in Hammurabi’s laws applies mainly between people of equal status.
Social ranks
Penalties depend on whether the victim is an awīlum (free man), a muškēnum (lower-status free person) or a slave.
King of justice
Mesopotamian kings were expected to establish “truth and equity” (kittum and mīšarum); the Code displays Hammurabi fulfilling this duty.
Divine legitimacy
The relief and prologue present Hammurabi’s authority as granted by the gods, especially Shamash and Marduk.
Model judgments
Many scholars see the laws as exemplary cases for learning and reflection, not as a statute book applied by courts.
Shared legal tradition
Hammurabi’s laws belong to a family of Near Eastern law collections, from Ur-Namma to the Hebrew Bible.

Records

  1. c. 2100 BCE — Laws of Ur-Namma, the oldest known Mesopotamian law collection, are compiled in Sumerian.
  2. c. 1792 BCE — Hammurabi succeeds his father Sin-muballit as king of Babylon (middle chronology).
  3. c. 1763 BCE — Hammurabi conquers Larsa, defeating Rim-Sin; Eshnunna and Mari fall soon after.
  4. c. 1754 BCE — The Code is composed and inscribed on stelae late in Hammurabi’s reign.
  5. c. 1750 BCE — Hammurabi dies; his son Samsu-iluna succeeds him.
  6. c. 1595 BCE — A Hittite raid sacks Babylon and ends the First Dynasty (middle chronology).
  7. c. 1158 BCE — The Elamite king Shutruk-Nahhunte carries Mesopotamian monuments, probably including the stele, to Susa.
  8. c. 650 BCE — Copies of the laws are kept in Ashurbanipal’s library at Nineveh; scribes continue to study the text.
  9. 1901 — The French mission at Susa under Jacques de Morgan finds the stele (winter 1901–1902).
  10. 1902 — Jean-Vincent Scheil publishes the first edition and French translation.
  11. 1960 — F. R. Kraus argues that the laws are exemplary judgments rather than legislation, reshaping the debate.

Glossary

Stele
An upright stone slab carved with an inscription or relief, set up as a public monument.
Cuneiform
A writing system of wedge-shaped signs pressed into clay or carved in stone, used in Mesopotamia for about 3,000 years.
Akkadian
A Semitic language of ancient Mesopotamia; Old Babylonian is the form used in Hammurabi’s time.
Amorites
A people of Syria and Mesopotamia whose dynasties ruled Babylon and many other cities in the early second millennium BCE.
Shamash
The Mesopotamian sun god, who sees all things and was therefore the god of justice.
Marduk
The patron god of Babylon, who rose to become the chief god of the Babylonian pantheon.
Awīlum
In the laws, a free man of full status.
Muškēnum
A free person of lower or dependent status; the exact meaning is debated.
River ordeal
A way of deciding a case by throwing the accused into the river; the river god was thought to judge guilt or innocence.
Middle chronology
The most commonly used system of absolute dates for early Mesopotamia, placing Hammurabi c. 1792–1750 BCE.

Questions and answers

Was the Code of Hammurabi the first law code?

No. Older law collections are known, such as those of Ur-Namma, Lipit-Ishtar and Eshnunna. Hammurabi’s is simply the longest and best preserved.

Does it really say “an eye for an eye”?

Yes, several laws punish injury with the same injury, but only when the victim and offender were of equal rank. For people of lower rank or slaves, money payments were required instead.

Where is the stele today?

In the Louvre Museum in Paris. Copies stand elsewhere, and fragments of other copies and many clay-tablet versions are held in museums around the world.

Why was it found in Iran, not Iraq?

It was carried off as war booty to Susa by an Elamite king in the twelfth century BCE, about 600 years after it was made.

Did Babylonian judges actually use it?

Surviving court records almost never cite it, so many scholars think it was a model of just judgments and a royal monument, not a rulebook that judges had to follow.

Is it related to the laws of Moses?

There are close similarities, such as the laws on goring oxen and on retaliation. Most scholars explain them through a shared legal tradition in the ancient Near East rather than direct copying.

Why are there empty spaces on the stone?

Several columns were polished off in antiquity, probably so that the Elamite king could add his own inscription. The missing laws are partly known from clay-tablet copies.

Sources and further reading

  1. Code of Hammurabi. Wikipedia
  2. Hammurabi. Wikipedia
  3. 함무라비 법전. 위키백과
  4. Law Code of Hammurabi, king of Babylon (Sb 8). Musée du Louvre, Collections
  5. The Code of Hammurabi, translated by L. W. King. The Avalon Project, Yale Law School
  6. Martha T. Roth, Law Collections from Mesopotamia and Asia Minor (2nd ed.). Scholars Press (Society of Biblical Literature, Writings from the Ancient World), 1997
  7. Marc Van De Mieroop, King Hammurabi of Babylon: A Biography. Blackwell, 2005

Related

Written with AI assistance from the published sources listed above, and revised as new research appears.

← Back to the map