Where is homosexuality illegal?

How same-sex sexual activity (also searched as homosexuality) is treated in 226 countries, from sources last checked September 2026. Choose a country for its classification, the source, and how its neighbours compare.

  • Legal 160 countries (71%), including China, India, United States and Brazil.
  • Illegal 56 countries (25%), including Indonesia, Pakistan, Bangladesh and Russia.
  • Death penalty possible 10 countries (4%), including Nigeria, Iran, Uganda and Afghanistan.

Legal 160

Illegal 56

Death penalty possible 10

About this data

Compiled from Wikipedia: LGBTQ rights by country or territory; sources last checked 17 September 2026. The full dataset is available as JSON.

More on relationships & sexuality

A visual reference compiled from Wikipedia’s law-by-country articles, not legal advice. Laws change and summaries simplify — check a primary source before relying on anything here.