LGBT rights by country or territory

Rights affecting lesbian, gay, bisexual, and transgender (LGBT) people vary greatly by country or jurisdiction – encompassing everything from the legal recognition of same-sex marriage to the death penalty for homosexuality.

Laws concerning gender identity-expression by country or territory
  Legal identity change, surgery not required
  Legal identity change, surgery required
  No legal identity change
  Unknown/Ambiguous

Worldwide laws regarding same-sex intercourse, unions and expression
Same-sex intercourse illegal. Penalties:
  Death
  Prison; death not enforced
  Death under militias
  Prison, w/ arrests or detention
  Prison, not enforced1
Same-sex intercourse legal. Recognition of unions:
  Extraterritorial marriage2
  Limited foreign
  Optional certification
  None
  Restrictions of expression
Rings indicate local or case-by-case application.
1No emprisonment in the past three years or moratorium on law.
2Marriage not available locally. Some jurisdictions may perform other types of partnerships.
LGBT rights at the United Nations
  
Neither States which did not support either declaration
  
Non-member states States that are not voting members of the United Nations
  
Oppose States which supported an opposing declaration in 2008 and continued their opposition in 2011
  
Subsequent member South Sudan, which was not a member of the United Nations in 2008
  
Support States which supported the LGBT rights declaration in the General Assembly or on the Human Rights Council in 2008 or 2011

Notably, as of January 2021, 29 countries recognized same-sex marriage. By contrast, not counting non-state actors and extrajudicial killings, only one country is believed to impose the death penalty on consensual same-sex sexual acts: Iran. The death penalty is officially law but generally not practiced in Afghanistan, Brunei, Mauritania, Nigeria (in the northern third of the country), Saudi Arabia, Somalia (in the autonomous state of Jubaland) and the United Arab Emirates. Sudan rescinded its unenforced death penalty for anal sex (hetero- or homosexual) in 2020. Fifteen countries have stoning on the books as a penalty for adultery, which would include gay sex, but this is only enforced by the legal authorities in Iran.[1][2]

In 2011, the United Nations Human Rights Council passed its first resolution recognizing LGBT rights, following which the Office of the United Nations High Commissioner for Human Rights issued a report documenting violations of the rights of LGBT people, including hate crimes, criminalization of homosexual activity, and discrimination. Following the issuance of the report, the United Nations urged all countries which had not yet done so to enact laws protecting basic LGBT rights.[3][4]