LGBTQ rights by country or territory

Worldwide laws regarding same-sex intercourse, unions and expression.
Same-sex intercourse legal. Recognition of unions:
  Extraterritorial marriage2
  Limited foreign
  Optional certification
Same-sex intercourse illegal. Penalties:
  Death
  Prison; death not enforced
  Death under militias
  Prison, with arrests or detention
  Prison, not enforced1
Ambiguous.
  None
  Restriction of expression, not enforced
  Restriction of association with arrests or detention

1No imprisonment in the past three years or moratorium on law.
2Marriage not available locally. Some jurisdictions may perform other types of partnerships.
LGBTQI+ 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, did not exist in 2008
  
Support States which supported the LGBTQ rights declaration in the General Assembly or on the Human Rights Council in 2008 or 2011

Rights affecting lesbian, gay, bisexual, transgender and queer (LGBTQ) 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 in 2025:
  Legal identity change, surgery not required, but not gender self-identification
  Legal identity change, surgery required
  No legal identity change

Notably, as of January 2025, 38 countries recognize same-sex marriage. By contrast, not counting non-state actors and extrajudicial killings, only two countries are believed to impose the death penalty on consensual same-sex sexual acts: Iran and Afghanistan. The death penalty is officially law, but generally not practiced, in Mauritania, Saudi Arabia, and Somalia (in the autonomous state of Jubaland). LGBTQ people also face extrajudicial killings in the Russian region of Chechnya. 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 (in light of the illegality of gay marriage in those countries) would by default include gay sex, but this is enforced by the legal authorities in Iran and Nigeria (in the northern third of the country).

In 2011, the United Nations Human Rights Council passed its first resolution recognizing LGBTQ rights, following which the Office of the United Nations High Commissioner for Human Rights issued a report documenting violations of the rights of LGBTQ 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 LGBTQ rights. A 2022 study found that LGBTQ rights (as measured by ILGA-Europe's Rainbow Index) were correlated with less HIV/AIDS incidence among gay and bisexual men independently of risky sexual behavior.

The 2023 Equaldex Equality Index ranks the Nordic countries, Chile, Uruguay, Canada, the Benelux countries, Spain, Andorra, and Malta among the best for LGBTQ rights. The index ranks Senegal, Oman, Brunei, Afghanistan, Somalia, Eritrea, Gambia, and Iran among the worst.

LGBT rights are supported by various international religious organizations, including progressive Christian denominations, and progressive Jewish organizations.