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, 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: they differed according to legal status, including distinctions among free people and between free and enslaved people.
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 probably stood originally in the sanctuary of the sun god Shamash at Sippar and was later carried to Susa (south-western Iran)
- Language and script
- Old Babylonian Akkadian, in monumental cuneiform with old-fashioned sign forms
- Object
- Stele about 2.25 m high, catalogued by the Louvre as basalt; 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
- Discovery
- Found in three pieces at Susa in the winter of 1901–1902 by the French mission led by Jacques de Morgan; first published by Jean-Vincent Scheil in 1902; on display in the Louvre since 1904
- Other copies
- Many copies on clay tablets, made over more than a thousand years down to the Persian period; a fragment of a first-millennium commentary also survives
- Significance
- The longest and best-preserved law collection of the ancient Near East and a key source for Mesopotamian society and ideas of kingship
On the map
On our historical map, around 1754 BCE, Babylon lies within Babylonia. See it on the map
Meanwhile elsewhere in the world
Other subjects in this library from around the same years, in distant parts of the world.
Easy
What is the Code of Hammurabi?
The Code of Hammurabi is a collection of legal provisions presented 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 dark stone, catalogued by the Louvre as 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. Modern legal codes systematically organise the rules of particular fields of law and are applied by courts; the Louvre stresses that Hammurabi’s text is not a legal code in that sense but a collection of case law. It is selective, leaves out many ordinary situations, and searches of the thousands of surviving Babylonian court records and contracts have found hints but no definitive evidence that it was applied in actual cases. 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.
Easy
How to “read” the stele
The top of the stele carries a relief sculpture about 60 by 65 centimetres. On the left stands Hammurabi, bearded, wearing a cap with a raised brim and a robe that leaves one shoulder bare. He raises his right hand, a gesture of prayer or respect. Facing him sits the god Shamash on a throne, his feet resting on a footstool that stands for the mountains over which the sun rises each morning. Flames burst from his shoulders, showing that he is the sun god. He holds out a rod and a ring, which the Louvre describes as the insignia of power.
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 called him to establish justice, and that he then inscribed his own just pronouncements. Pamela Barmash notes that the scene shows Hammurabi both as subordinate to the god and as raised close to the god’s level, since nothing separates the two figures.
Below the relief the inscription covers most of the rest of the stele in columns. It is written in a monumental Old Babylonian script with old-fashioned sign forms, which gave the royal monument an air of tradition, 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 erased in antiquity, probably 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.
Easy
What the laws say
Almost all the rules follow the same pattern: “If a man does X, then Y shall happen.” The Louvre notes that this is the same sentence structure used in Mesopotamian treatises on divination and medicine. Scholars call this form “casuistic” law: provisions framed as particular cases. 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. Under §229, a builder who fails to make a house sound is put to death if its collapse kills the owner. Sections 215–218 regulate specified operations with a bronze lancet: the fees vary with the patient’s status, and causing the patient’s death or destroying his eye in the cases set out in §218 brings the loss of the physician’s hand. A person who neglects the embankment of his field, so that a breach floods the common irrigated land, must replace the grain that is lost. Under §117, if a man in debt sells his wife, son or daughter or gives them into debt service, they serve for three years and are released in the fourth.
Some provisions protect weaker people. A wife whose husband is taken captive and who has nothing to live on may enter another man’s house without being punished. Section 137 grants a dowry refund and half of the field, orchard and property for raising the children when a man divorces a šugītum who bore him children or a nadītum who provided him with children. At the same time the laws accept slavery, punish some crimes with death by drowning or burning, and give women fewer rights than men.
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 another man (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. Sections 196–201 distinguish injuries by the victim’s status. Destroying the eye of a muškēnum, a free person of lower or dependent status (the exact meaning of the term is debated), or breaking his bone required one mina of silver; knocking out his tooth required one-third of a mina. Destroying the eye or breaking the bone of another man’s slave required payment of half the slave’s value. 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 the Louvre points out that it is far from a call for vengeance: it requires the punishment to be proportional to the damage suffered. 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.
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 much of his reign Hammurabi worked through diplomacy and shifting alliances. A diplomatic report of the time observed that no king was powerful on his own: ten or fifteen kings followed Hammurabi of Babylon, and as many followed Rim-Sin of Larsa. In the last part of his reign he defeated Rim-Sin and took Larsa (1763 BCE) and turned against his former ally Zimri-Lim, capturing Mari (1761 BCE), bringing much of southern and central Mesopotamia under Babylonian rule. Eshnunna was destroyed by a flood in 1756 BCE; how far this resulted from Hammurabi’s military action is uncertain. 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 were expected to establish kittum and mīšarum, “truth” and “equity”. In practice they did so through general acts of equity, through mīšarum edicts that regulated economic life, for example by cancelling certain debts, and through law collections. The Code belongs to this ideal: it presents 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.
Intermediate
Copies, plunder and rediscovery
The stele in the Louvre was probably not the only one. Its epilogue says that Hammurabi set up his inscribed stele in Esagil, the temple of Marduk in Babylon, yet the surviving stele probably stood originally in the sanctuary of the sun god Shamash at Sippar, although its original location is not certain. Scholars therefore think that copies were set up in more than one city.
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 Louvre states that the stele of Hammurabi was brought to Susa in this way as a spoil of war; other Mesopotamian monuments, such as the victory stele of Naram-Sin, shared its fate. The erased columns on the front were most likely prepared for an Elamite inscription recording this capture.
The text also survived on clay. It entered the scribal curriculum as a classic and was copied for more than a thousand years, in both Assyria and Babylonia, down to the Persian period. The laws and especially the prologue and epilogue were copied by scribes in training. Its fame was such that a commentary on it was composed in the first millennium BCE; the surviving fragment is the only known exegetical treatise on any legal text from ancient Mesopotamia.
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 in 1902, and it has been displayed in the Louvre since 1904. 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.
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 case-based form and several of its topics, although their surviving literary frames differ: the Eshnunna laws, for example, have no clear epilogue.
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.
The similarities have competing explanations. Pamela Barmash, for example, favours indirect influence through a shared scribal tradition, in which certain model cases and ways of reasoning were widely known, rather than direct textual borrowing. David P. Wright argues instead that the Covenant Code directly used and revised Hammurabi’s laws. The degree and route of dependence remain debated.
In the modern world Hammurabi has become a symbol of the rule of law. Since 1950 his relief portrait has been one of the portraits of lawgivers in the chamber of the United States House of Representatives, and in 1977 Iraq presented a replica of the stele to the United Nations in New York.
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, supreme power and called Hammurabi by name “to make justice prevail in the land, to destroy the wicked and the evil, so that the strong should not oppress the weak” (CDLI translation). It then lists more than twenty cities and their temples, presenting Hammurabi as their benefactor.
The epilogue explains that Hammurabi inscribed his pronouncements on his stele and set it up before his statue as “king of justice” so that any wronged man with a lawsuit could come, have the inscription read aloud 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 these judgments in stone, Hammurabi presented himself as having fulfilled the gods’ command to establish justice.
The prologue and epilogue were also valued as literature. The text became a classic of Babylonian literature, and scribes in later periods went on copying it, prologue and epilogue included.
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 searches for evidence that the Code was applied in actual cases, or derived from actual verdicts, have produced hints but no definitive evidence, and in some areas, such as adoption, the statutes differ from what practical legal documents show.
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 Mesopotamian scholarly lists, such as omen collections and medical texts, which use the same “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. Some have read the stele mainly as royal propaganda. Raymond Westbrook’s work shaped a North American approach that treats such collections as products of a shared scribal legal tradition; building on it, Pamela Barmash argues that the laws were scribes’ reflections on justice, presented in the form of a royal inscription to show that Hammurabi had fulfilled the gods’ mandate, and that they influenced practice through the training of scribes involved in legal matters rather than as binding precedent.
Scholars continue to disagree about the collection’s legal authority. Its scribal composition and royal presentation are widely studied, but neither direct application in courts nor derivation from actual verdicts has been conclusively demonstrated, and some researchers, especially in continental European legal history, still defend its legal validity as a royal text. These interpretations are best seen as competing approaches. The debate illustrates the danger of reading ancient texts through modern categories such as “code” or “statute”.
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” or “palace dependant”, among other options. 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 early twentieth-century version, widely available online, are useful but outdated in places.
Historians must also read the laws against other sources: Hammurabi’s letters, which show him personally engaged in the details of administration; 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 relationship between the Code and everyday legal practice remains debated.
Finally, the chronology of Hammurabi’s reign depends on the unresolved question of Mesopotamian absolute chronology. This article uses the Middle Chronology; the Low and High Chronologies place Hammurabi’s reign several 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.
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 collection presents Hammurabi as fulfilling this royal duty.
- Divine legitimacy
- The relief and prologue present Hammurabi’s authority as granted by the gods, especially Shamash and Marduk.
- Model judgments
- One influential interpretation treats the provisions as exemplary cases shaped by scribal reasoning; their legal authority remains debated.
- Shared legal tradition
- Hammurabi’s laws belong to a family of Near Eastern law collections, from Ur-Namma to the Hittite laws; how they relate to biblical law is debated.
Records
- c. 2100 BCE — Laws of Ur-Namma, the oldest known Mesopotamian law collection, are compiled in Sumerian.
- c. 1792 BCE — Hammurabi succeeds his father Sin-muballit as king of Babylon (middle chronology).
- c. 1763 BCE — Hammurabi takes Larsa, defeating Rim-Sin (1763 BCE); Mari falls in 1761 BCE, and a flood destroys Eshnunna in 1756 BCE.
- c. 1754 BCE — The Code is composed and inscribed on stelae late in Hammurabi’s reign.
- c. 1750 BCE — Hammurabi dies; his son Samsu-iluna succeeds him.
- c. 1595 BCE — A Hittite raid sacks Babylon and ends the First Dynasty (middle chronology).
- c. 1158 BCE — The Elamite king Shutruk-Nahhunte carries Mesopotamian monuments, probably including the stele, to Susa.
- c. 539 BCE — After the Persian conquest of Babylon (539 BCE), scribes are still copying Hammurabi’s laws.
- 1901 — The French mission at Susa under Jacques de Morgan finds the stele (winter 1901–1902).
- 1902 — Jean-Vincent Scheil publishes the first edition and French translation.
- 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 divine test in which the accused went into the river, used in certain unresolved accusations; the outcome was taken as the river god’s judgment.
- 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 provisions prescribe a matching bodily injury, but only when victim and offender were of the same status. Sections 196–201 distinguish eye, bone and tooth injuries by status, and for lower-status people and slaves they set money payments that also differ by injury.
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?
No surviving court record has been shown to apply it directly, so many scholars think it was a model of just judgments and a royal monument rather than a rulebook that judges had to follow. Others still defend its legal force, and the question remains debated.
Is it related to the laws of Moses?
They share cases such as goring oxen and retaliation. Scholars debate whether these similarities reflect shared traditions, direct literary dependence, or a combination of processes.
Why are there empty spaces on the stone?
Several columns were erased 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
- Law Code of Hammurabi, king of Babylon (Sb 8). Musée du Louvre, Collections
- The Code of Hammurabi. Musée du Louvre
- Kodex Hammurapi (cast RS 52). Universität Münster, Institut für Altorientalistik und Vorderasiatische Archäologie
- RIME 4.03.06.add21 (Laws of Hammurapi) composite, P464358: transliteration, normalisation and English translation. Cuneiform Digital Library Initiative (CDLI)
- The Code of Hammurabi, translated by L. W. King. The Avalon Project, Yale Law School
- Enrique Jiménez, Commentary on Codex Hammurapi (CCP 5.1). Cuneiform Commentaries Project, Yale University
- Hammurabi. Encyclopaedia Britannica
- Dominique Charpin, Hammurabi of Babylon (publisher’s preview, including the time chart). I.B. Tauris, 2012
- Pamela Barmash, The Laws of Hammurabi: At the Confluence of Royal and Scribal Traditions. Oxford University Press, 2020
- Dylan R. Johnson, Review of Pamela Barmash, The Laws of Hammurabi: At the Confluence of Royal and Scribal Traditions. Zeitschrift für Altorientalische und Biblische Rechtsgeschichte 28, pp. 265–270 (author’s version, ORCA, Cardiff University), 2022
- David P. Wright, Inventing God’s Law: How the Covenant Code of the Bible Used and Revised the Laws of Hammurabi. Oxford University Press, 2009
- Martha T. Roth, Law Collections from Mesopotamia and Asia Minor (2nd ed.). Scholars Press (Society of Biblical Literature, Writings from the Ancient World), 1997
- Marc Van De Mieroop, King Hammurabi of Babylon: A Biography. Blackwell, 2005
- Hammurabi, Relief Portrait (House Chamber, 1950). Architect of the Capitol
- Replica of The Codes of Hammurabi (gift of Iraq, 1977). United Nations Gifts
Related
- Epic of GilgameshA king's friendship with Enkidu and his search for immortality, assembled from earlier Sumerian poems into a Babylonian epic.
- Instructions of ShuruppakOne of the oldest surviving works of literature: a Sumerian father's advice to his son, preserved on clay tablets.
- EnheduannaHigh priestess of the moon god at Ur and daughter of Sargon of Akkad, often called the earliest author known by name.
Written with AI assistance from the published sources listed above, and revised as new research appears.
