Middle Ages624
Tang Code (624): The Legal Code That Shaped East Asian Law
The Tang Code, first issued in 624 and given an official commentary in 653, is China's oldest fully surviving law code and a model for Japan, Korea and Vietnam.

Contents
The Tang Code is the body of penal law issued by China’s Tang dynasty, first promulgated in 624 and given an authoritative commentary in 653. With about 500 articles arranged in twelve sections, it is the oldest Chinese law code to survive complete. It shaped Chinese law for more than a thousand years and served as the model for codes in Japan, Korea and Vietnam.
Background
Chinese rulers had issued written laws since at least the Warring States period, and each dynasty revised the codes of its predecessors. The Sui dynasty, which reunified China in 589, issued the Kaihuang Code in 581–583. It reduced harsh punishments and organised the law into twelve sections, a structure the Tang kept.
When Li Yuan founded the Tang in 618, he quickly issued a short set of provisional laws to win support. A commission then prepared a full code, which was promulgated in 624, the seventh year of the Wude era. It followed the Sui model closely.
Revisions and the commentary
Emperor Taizong ordered a thorough revision, carried out by officials including Fang Xuanling and completed in 637. It reduced the number of capital offences and reworked many penalties. A further revision was issued in 651 under Emperor Gaozong.
Because judges interpreted articles differently, Gaozong ordered an official commentary. A commission headed by his uncle, the chief minister Zhangsun Wuji, presented it in 653. The Tanglü shuyi, often translated as The Tang Code with Commentary, explains each article, defines terms and answers hypothetical questions. The text that survives today combines code and commentary; scholars debate whether it reflects the 653 version or a later revision of 737.
Structure and content
The code was one of four kinds of Tang law. The lü (code) defined crimes and penalties; ling (statutes) regulated administration; ge (regulations) and shi (ordinances) supplied detailed rules. Only the lü survives in full.
Its twelve sections begin with General Principles, which set out the rules applying throughout. Later sections cover the imperial guard and palace security, official conduct, households and marriage, state stables and granaries, unauthorised military and labour levies, violence and theft, assaults and accusations, fraud and counterfeiting, miscellaneous offences, arrest and flight, and trials and prisons.
The code used five regular punishments:
| Punishment | Range |
|---|---|
| Beating with the light stick | 10–50 strokes |
| Beating with the heavy stick | 60–100 strokes |
| Penal servitude | 1–3 years |
| Life exile | 2,000, 2,500 or 3,000 li from home |
| Death | strangulation or decapitation |
Principles of Tang law
Tang law tied penalties precisely to each offence, leaving judges little discretion. Officials who passed sentences that were too heavy or too light could themselves be punished, and where no article fitted a case, judges were told to reason by analogy from the nearest provision, with their decisions subject to review by higher courts. It also reflected Confucian ideas of hierarchy. A crime against a parent or senior relative was punished far more severely than the same act against a stranger. The “Ten Abominations”, such as rebellion and lack of filial piety, were the gravest offences and were excluded from most pardons.
Rank brought privileges. Members of the imperial family, high officials and certain others could have their cases referred to the emperor under the “Eight Deliberations”, and many officials could redeem punishments with payments of copper or by surrendering office. Death sentences required review, and executions in the capital needed repeated confirmation before they were carried out.
Influence across East Asia
The Tang Code travelled with Tang prestige. Japan, after the Taika Reform of 645, built a full ritsuryō system, meaning government by penal code and administrative statutes, culminating in the Taihō Code of 701 and the Yōrō Code of 718. Japanese students and officials who sailed with the missions to Tang China helped bring these models home.
In Korea, the Goryeo dynasty based its law on Tang codes. In Vietnam, the Lê Code issued in the fifteenth century combined Tang and Ming elements with local customs, including notable property rights for women. In China itself, the Song code of 963 copied the Tang Code almost entirely. Later Ming and Qing codes reorganised the material, but they kept the five punishments, the Ten Abominations and many individual articles. Modern scholars use the Tang Code as a key source on Tang family life, slavery, landholding and official privilege, and fragments of Tang statutes found at Dunhuang and Turfan, and preserved in Japanese sources, have helped reconstruct the wider legal system.
Timeline
- 581–583: The Sui issue the Kaihuang Code, the main model for Tang law.
- 618: Li Yuan founds the Tang and issues provisional laws.
- 624: The first full Tang Code is promulgated.
- 637: A revised code is completed under Emperor Taizong.
- 651: Further revision under Emperor Gaozong.
- 653: The official commentary, the Tanglü shuyi, is presented.
- 701: Japan’s Taihō Code adopts the Tang model.
- 963: The Song dynasty’s code reproduces the Tang Code.
Why it matters
The Tang Code is the earliest complete window into Chinese law and society, showing how the state defined crimes, families and social rank. Its framework lasted into the early twentieth century and gave Japan, Korea and Vietnam a shared legal vocabulary.
Frequently asked questions
What is the Tang Code?
The Tang Code is the penal law code of the Tang dynasty of China, first promulgated in 624 and revised several times. It contains about 500 articles in twelve sections and is the oldest Chinese law code to survive complete.
Who wrote the Tang Code?
It was drafted by commissions of senior officials, building on the Sui dynasty's Kaihuang Code of 581–583. The official commentary of 653, known as the Tanglü shuyi, was prepared by a commission headed by Zhangsun Wuji.
What punishments did the Tang Code use?
It set out five regular punishments: beating with a light stick, beating with a heavy stick, penal servitude of one to three years, life exile at set distances, and death by strangulation or decapitation. The penalty was fixed by the article and adjusted for rank, kinship and circumstances.
How did the Tang Code influence other countries?
Japan's Taihō Code of 701 and Yōrō Code of 718 were closely modelled on Tang law. Korean dynasties such as Goryeo and Vietnamese codes, including the fifteenth-century Lê Code, also drew on the Tang model.
How long did the Tang Code remain in use?
Its substance outlived the dynasty. The Song dynasty's code of 963 reproduced it almost entirely, and later Ming and Qing codes kept many of its principles and categories until the early twentieth century.
Sources and further reading
- Wallace Johnson (trans.), The T'ang Code, Volume I: General Principles (Princeton University Press, 1979)
- Wallace Johnson (trans.), The T'ang Code, Volume II: Specific Articles (Princeton University Press, 1997)
- Derk Bodde and Clarence Morris, Law in Imperial China (Harvard University Press, 1967)
- Encyclopaedia Britannica, "Tang code"
Cite this article
“Tang Code (624): The Legal Code That Shaped East Asian Law.” Chronicle, https://chronicle.bigworldlist.com/articles/tang-code-624/.