Caning is a form of corporal punishment consisting of a number of hits (known as "strokes" or "cuts") with a single cane usually made of rattan, generally applied to the offender's bare or clothed buttocks (see spanking) or hand(s) (on the palm). Caning on the knuckles or shoulders is much less common. Caning can also be applied to the soles of the feet (foot whipping or bastinado). The size and flexibility of the cane and the mode of application, as well as the number of the strokes, vary greatly -- from a couple of light strokes with a small cane across the seat of a junior schoolboy's trousers, to a maximum of 24, very hard, wounding cuts on the bare buttocks with a large, heavy, soaked rattan as a judicial punishment in some Southeast Asian countries.
The thin cane generally used for corporal punishment is not to be confused with a walking stick, which is sometimes also called a cane (especially in American English), but is thicker and much more rigid, and likely to be made of stronger wood.
Caning was a common form of judicial punishment and official school discipline in many parts of the world in the 19th and 20th centuries. Corporal punishment (with a cane or any other implement) has now been outlawed in much, but not all, of Europe. However, caning remains legal in numerous other countries in home, school, religious, judicial or military contexts, and is also in common use in some countries where it is no longer legal.
Judicial caning, administered with a long, heavy rattan and much more severe than the canings given in schools, was/is a feature of some British colonial judicial systems, though the cane was never used judicially in Britain itself (the specified implements there, until abolition in 1948, being the birch and the cat-o'-nine-tails). In some countries caning is still in use in the post-independence era, particularly in Southeast Asia (where it is now being used far more than it was under British rule), and in some African countries.
The practice is retained, for male offenders only, under the criminal law in Malaysia, Singapore and Brunei. (In Malaysia there is also a separate system of religious courts for Muslims only, which can order a much milder form of caning for women as well as men.) Caning in Indonesia is a recent introduction, in the special case of Aceh, on Sumatra, which since its 2005 autonomy has introduced a form of sharia law for Muslims, as well as non-Muslims since 2014 (male or female), applying the cane to the clothed upper back of the offender.
African countries still using judicial caning include Botswana, Tanzania, Nigeria (mostly in northern states, but few cases have been reported in southern states) and, for juvenile offenders only, Swaziland and Zimbabwe. Other countries that used it until the late 20th century, generally only for male offenders, included Kenya, Uganda and South Africa, while some Caribbean countries such as Trinidad and Tobago use birching, another punishment in the British tradition, involving the use of a bundle of branches, not a single cane.
In Singapore, Malaysia and Brunei, healthy males under 50 years of age can be sentenced to a maximum of 24 strokes of the rotan (rattan) cane on the bare buttocks; the punishment is mandatory for many offences, mostly violent or drug crimes, but also immigration violations, sexual offences and (in Singapore) acts of vandalism. It is also imposed for certain breaches of prison rules. In Aceh caning can be imposed for adultery. The punishment is applied to foreigners and locals alike.
Two examples of the caning of foreigners which received worldwide media scrutiny are the canings in Singapore in 1994 of Michael P. Fay, an American student who had vandalised several automobiles, and in the United Arab Emirates in 1996 of Sarah Balabagan, a Filipina maid convicted of homicide.
Caning is also used in the Singapore Armed Forces to punish serious offences against military discipline, especially in the case of recalcitrant young conscripts. Unlike judicial caning, this punishment is delivered to the soldier's clothed buttocks. See Caning in Singapore#Military caning.
The frequency and severity of canings in educational settings have varied greatly, often being determined by the written rules or unwritten traditions of the school. The western educational use of the cane dates principally to the late nineteenth century, gradually replacing birching--effective only if applied to the bare bottom--with a form of punishment more suited to contemporary sensibilities, once it had been discovered that a flexible rattan cane can provide the offender with a substantial degree of pain even when delivered through a layer of clothing.
Caning as a school punishment is strongly associated in the English-speaking world with England, but it was also used in other European countries in earlier times, notably Scandinavia, Germany and the countries of the former Austrian empire.
In some schools corporal punishment was administered solely by the headmaster, while in others the task was delegated to other teachers. In many English and Commonwealth private schools, authority to punish was also traditionally given to certain senior students (often called prefects). In the early 20th century, such permission for prefects to cane other boys was widespread in British public schools. The perceived advantages of this were promptness of punishment and avoiding bothering the teaching staff with minor disciplinary matters. Canings from prefects took place for a wide variety of failings, including lack of enthusiasm in sport, with the punishment repeated, if necessary, until the younger boy's performance or attitude improved. From at least the late 19th century onwards, prefects had also used canings to enforce youngsters' participation in other character-building aspects of public school life, such as compulsory cold baths in winter.
Another claimed advantage was that boys who misbehaved would be chastised more effectively by receiving a caning from a prefect than from a teacher, because pupils associate more closely with each other than with teachers, and thus the impact would be better known in the culprit's immediate peergroup. Such systems were not limited to secondary age pupils. From at least the early 1860s onwards, some private preparatory schools relied heavily on "self-government" by prefects for even their youngest pupils (around eight years old), with caning the standard punishment for even minor offences. It was regarded as having "no sense of indignity" for the recipient of the punishment.
As early as the 1920s, the tradition of prefects at British public schools repeatedly caning new boys for trivial offences was criticised by psychologists as producing "a high state of nervous excitement" in some of the youngsters subjected to it. It was felt that granting untrained and unsupervised older adolescents the power to impose comprehensive thrashings on their younger schoolmates whenever they chose might have adverse psychological effects.
Some British private schools still permitted caning to be administered by prefects in the 1960s, with opportunities for it provided by complex sets of rules on school uniform and behaviour. In 1969, when the question was raised in Parliament, it was thought that relatively few schools still permitted this. By contrast, caning in British state schools in the later 20th century was often, in theory at least, administered by the head teacher only. Canings for primary school age pupils at state schools in this period could be extremely rare; one study found that over an eight-year timespan, one head teacher had only caned two boys in total, but made more frequent use of slippering, while another had caned no pupils at all.
Like their British counterparts, South African private schools also gave prefects free rein to administer canings whenever they felt it appropriate, from at least the late 19th century onwards. South African schools continued to use the cane to emphasise sporting priorities well into the late 20th century, caning boys for commonplace gameplay errors such as being caught offside in an association football match, as well as for poor batting performance in cricket, not applauding their school team's performance sufficiently, missing sport practice sessions, or even "to build up team spirit". The use of corporal punishment within the school setting was prohibited by the South African Schools Act of 1996. According to Chapter 2 Section 10 of the act, (1) No person may administer corporal punishment at a school to a learner and (2) Any person who contravenes subsection (1) is guilty of an offence and liable on conviction to a sentence, which could be imposed for assault.
In many state secondary schools in England and Wales it was in use, mostly for boys, until 1987, while elsewhere other implements prevailed, such as the Scottish tawse. The cane was generally administered in a formal ceremony to the seat of the trousers, typically with the student bending over a desk or chair. Usually there was a maximum of six strokes (known as "six of the best"). Such a caning would typically leave the offender with uncomfortable weals and bruises lasting for many days after the immediate intense pain had worn off. A headmaster's caning of a 13-year-old schoolboy at an English grammar school in 1987--five strokes for poor exam results--left "severe bruising", and, according to the family doctor, five separate weals. The headmaster who gave the punishment was cleared of the offence of assault occasioning actual bodily harm, with the judge commenting "If you get a beating you must expect it to be with force."
Schoolgirls were caned much more rarely than boys, and if the punishment was given by a male teacher, nearly always on the palm of the hand. In some cases, girls were caned on the clothed bottom, in which case the punishment would probably be applied by a female teacher. 
Caning as a school punishment for boys is still routine in a number of former British territories including Singapore, Malaysia and Zimbabwe. Until recently it had also been common in Australia (now banned in public schools except the ACT (Australian Capital Territory), and abolished in practice (though not strictly in theory) by the vast majority of all independent schools),New Zealand (banned from 1990) and South Africa (banned in public and private schools alike from 1996). In the UK, all corporal punishment in private schools was finally banned in 1999 for England and Wales, 2000 in Scotland, and 2003 in Northern Ireland.
In Malaysia, the Education Ordinance 1957 specifically outlaws the caning of girls in school. However, the caning of girls is still rather common in primary schools, and also (less commonly) in secondary schools. This caning is usually carried out on the palm or clothed bottom.  Sometimes, the cane can hit the student's thighs or arms, causing injury, usually in the form of bruises, bleeding, or obvious welts.  Students (both male and female) can even be caned for minor mistakes like being unable to answer questions correctly or forgetting to bring a textbook. In November 2007, in response to a perceived increase in indiscipline among female students, the National Seminar on Education Regulations (Student Discipline) passed a resolution recommending allowing the caning of female students at school. The resolution is currently[when?] in its consultation process.
The cane was also used more or less frequently on boy inmates at the British youth reformatories known from 1933 to 1970 as approved schools, and rarely for girls in such schools. In approved schools the cane was applied to the buttocks for boys and to the hands for girls, but after approved schools became "Community Homes with Education" under the Children and Young Persons Act 1969, girls could be caned on the buttocks. Caning is still used in the equivalent institutions in some countries, such as Singapore and Guyana.
In 19th-century France it was dubbed "The English Vice", probably because of its widespread use in British schools. The regular depiction of caning in British novels about school life from the 19th century onwards, as well as movies such as If...., which includes a dramatic scene of boys caned by prefects, contributed to the French perception of caning as being central to the British educational system. Caning was not unknown for French boys in the 19th century, but they were described as "extremely sensitive" to corporal punishment and tended to make a fuss about its imposition.
Member states of the Convention on the Rights of the Child are obliged to "take all appropriate legislative, administrative, social and educational measures to protect the child from all forms of physical or mental violence, injury or abuse."
Also known as domestic corporal punishment, parents can cane a child as a punishment for disobedience, which is a common practice in some Asian countries such as Singapore, China, Malaysia, and others. See Caning in Singapore.
Caning with a heavy judicial rattan as used in Singapore, Malaysia and Brunei can leave scars for years if a large number of strokes are inflicted. However, most ordinary canings with a typical light rattan (used at home for punishing children or at school for punishing students), although painful at the time, leave only reddish welts or bruises lasting a few days. Charles Chenevix Trench was caned as a boy at Winchester College in the early 1930s and later said that "it was, of course, disagreeable, but left no permanent scars on my personality or my person".
When caning was widespread in schools in the United Kingdom, it was perceived that a caning on the hand carried a greater risk of injury than a caning on the buttocks; in 1935 an Exeter schoolboy won £1 in damages (equivalent to £68 in 2018), plus his medical expenses, from a schoolmaster, when the county court decided that an abscess that developed on his hand was the result of a caning.