
Beard and haircut laws by country

Secular laws regulating hairstyles exist in various countries and institutions.
Present laws.
India.
In the Armed, Paramilitary and Law enforcement forces of India, male Sikh servicemen are allowed to wear full beards as their religion expressly requires followers to do so. However, they are specifically required to "dress up their hair and beard properly". In December 2003, the Supreme Court of India ruled that Muslims in uniform can grow beards. 
Non-Muslims and non-Sikhs serving in the Indian Army or the Indian Air Force are not permitted to wear beards. However, Army personnel on active duty are sometimes exempt from facial hair regulations for the duration of their tour of duty if their deployment makes it difficult to shave. Indian Navy personnel are allowed to grow beards subject to the permission of their commanding officer. Exceptions for other religions are made in the case of special forces operatives like the Indian Air Force Pilots, Indian army's Para (Special Forces) soldiers and the navy's MARCOS commandos who are allowed to grow beards. Non-Sikh personnel are allowed to grow whiskers and moustaches, with the only regulation being that "will be of moderate length".
Iran.
In an attempt to preserve the culture of the country and combat cultural imperialism, the government of Iran has banned "Western hair styles" for men, including ponytails, mullets and spikes.
North Korea.
Radio Free Asia reported in 2014 that the North Korean government had a recommended list of 18 hair styles for women and 10 hair styles for men, and that some colleges had recommended male students model their hair after Kim Jong-un. However, Dr. Katharine H.S. Moon, Wasserman Chair of Asian Studies at Wellesley College, refutes these claims, stating that, "There’s no evidence that their hairstyles must follow totalitarian regulation," and that she had personally witnessed a wide variety of hair styles, including hair dye, while visiting Pyongyang in 2013.
Tajikistan.
Beards are discouraged by the government for most men in Tajikistan in an effort to battle radicalism. Only clean-shaven men can apply for a passport. Beards are often forcibly shaved off by police officers.
Thailand.
Male Thai police and military personnel, as of 2017, are required to wear a hairstyle known as the "904 cut". The style means shaving the sides and back of the head, leaving just a suggestion of hair on top. The corresponding hairstyle for female police officers and female soldiers is unclear.
School dress codes in Thailand have long mandated earlobe-length bobs for girls and army-style crew cuts for boys. It is not uncommon for teachers to cut the hair of students deemed to be in violation of the frequently arbitrary code.
Uzbekistan.
Beards are considered a sign of extremist political and religious views in Uzbekistan with the head of state security suggesting they pose a threat to national security.
Past laws.
Albania.
During his regime, Enver Hoxha banned all hair longer than 4cm (1.6 inches) for men, as well as all beards. No man could enter the country whilst wearing one of the banned hair styles.
China.
The Han Chinese first Ming dynasty emperor Zhu Yuanzhang passed a law on mandatory hairstyle on 24 September, 1392, mandating that all males grow their hair long and making it illegal for them to shave part of their foreheads while leaving strands of hair which was the Mongol hairstyle. The penalty for both the barber and the person who was shaved and his sons was castration if they cut their hair and their families were to be sent to the borders for exile. This helped eradicated partially shaved Mongol hairstyles and enforced long Han hairstyle.
In Qing dynasty China, all male subjects of all ethnicities were required to wear their hair in a long braid and to shave the front of their scalp. Those who resisted were subject to execution for treason.
Czechoslovakia.
Following the Prague Spring of 1968, Western 1960s counterculture inspired the "Mánička" subculture amongst Czechoslovak youth. The long hairstyles associated with this was discouraged and suppressed by the authorities, who saw it as a subversive Western cultural influence.
Japan.
In the Edo period of Tokugawa Shogunate Japan orders were passed for Japanese men to shave the pate on the front of their head (the chonmage hairstyle) and shave their beards, facial hair and side whiskers. This was similar to the Qing dynasty queue order imposed by Dorgon making men shave the pates on the front of their heads.
Russia.
As part of his drive to modernise and Westernise Tsarist Russia, Peter the Great imposed a beard tax in 1698 to encourage Russian men to shave off their beards. Men who kept their beards but refused to pay the tax were forcibly shaven.
Singapore.
There was a national ban of long hair for men in Singapore; the reason was the growth of hippie subculture worldwide. The law has since changed and nowadays, men can display any kind of hairstyle.
South Korea.
In 1973, South Korea under Park Chung-hee introduced the Minor Offenses Act which limited the length of hair for males, as well as length of skirts for females. There are no specific definitions of acceptable hair length, and violators were often taken to police stations and had their hair cut against their will.
Vietnam.
The Han Chinese referred to the various non-Han "barbarian" peoples of north Vietmam and southern China as "Yue" (Viet) or Baiyue, saying they possessed common habits like adapting to water, having their hair cropped short and tattooed. The Han also said their language was "animal shrieking" and that they lacked morals, modesty, civilization and culture.
When Han Chinese ruled the Vietnamese in the Fourth Chinese domination of Vietnam due to the Ming dynasty's conquest during the Ming–Hồ War they imposed the Han Chinese style of men wearing long hair on short-haired Vietnamese men. Vietnamese were ordered to stop cutting and instead grow their hair long and switch to Han Chinese clothing in only a month by a Ming official. Ming administrators said their mission was to civilize the unorthodox Vietnamese barbarians. The Ming dynasty only wanted the Vietnamese to wear long hair and to stop teeth blackening so they could have white teeth and long hair like Chinese. A royal edict was issued by Vietnam in 1474 forbidding Vietnamese from adopting foreign languages, hairstyles and clothes like that of the Lao, Champa or the Ming "Northerners". The edict was recorded in the 1479 Complete Chronicle of Dai Viet of Ngô Sĩ Liên in the Later Lê dynasty.