Data

Number of countries where same-sex marriage is legal

What you should know about this indicator

The data is up to date as of June 2025.

Number of countries where same-sex marriage is legal
Same-sex marriage is marriage and marriage recognition between two people of the same biological sex or gender identity.
Source
Pew Research Center (2025)with major processing by Our World in Data
Last updated
June 27, 2025
Next expected update
June 2026
Date range
2000–2025

Sources and processing

Pew Research Center – Same-sex marriage around the world - Pew Research Center

Since the first same-sex marriages were legally recognized in the Netherlands in 2001, nearly 40 other jurisdictions – mostly in Europe and the Americas – have enacted laws allowing gay and lesbian couples to marry. This year, Thailand and Liechtenstein join the list.

Use the interactive table below to sort the places allowing same-sex marriages by name, region and the year legal same-sex marriage took effect. The table also includes some key facts about the process in each jurisdiction.

Retrieved on
June 27, 2025
Citation
This is the citation of the original data obtained from the source, prior to any processing or adaptation by Our World in Data. To cite data downloaded from this page, please use the suggested citation given in Reuse This Work below.
Pew Research Center (2025). https://www.pewresearch.org/religion/fact-sheet/gay-marriage-around-the-world/
“Same-Sex Marriage Around the World.” Pew Research Center, Washington, D.C. (2 June 2025) https://www.pewresearch.org/religion/fact-sheet/gay-marriage-around-the-world/.

Since the first same-sex marriages were legally recognized in the Netherlands in 2001, nearly 40 other jurisdictions – mostly in Europe and the Americas – have enacted laws allowing gay and lesbian couples to marry. This year, Thailand and Liechtenstein join the list.

Use the interactive table below to sort the places allowing same-sex marriages by name, region and the year legal same-sex marriage took effect. The table also includes some key facts about the process in each jurisdiction.

Retrieved on
June 27, 2025
Citation
This is the citation of the original data obtained from the source, prior to any processing or adaptation by Our World in Data. To cite data downloaded from this page, please use the suggested citation given in Reuse This Work below.
Pew Research Center (2025). https://www.pewresearch.org/religion/fact-sheet/gay-marriage-around-the-world/
“Same-Sex Marriage Around the World.” Pew Research Center, Washington, D.C. (2 June 2025) https://www.pewresearch.org/religion/fact-sheet/gay-marriage-around-the-world/.

All data and visualizations on Our World in Data rely on data sourced from one or several original data providers. Preparing this original data involves several processing steps. Depending on the data, this can include standardizing country names and world region definitions, converting units, calculating derived indicators such as per capita measures, as well as adding or adapting metadata such as the name or the description given to an indicator.

At the link below you can find a detailed description of the structure of our data pipeline, including links to all the code used to prepare data across Our World in Data.

Read about our data pipeline
Notes on our processing step for this indicator

We converted the original data with the years of the legalization of same-sex marriage into a expanded dataset with the legal status of same-sex marriage for each country and year.

We estimated regional aggregations of these status by using Our World in Data definitions of regions and our consolidated population data.

How to cite this page

To cite this page overall, including any descriptions, FAQs or explanations of the data authored by Our World in Data, please use the following citation:

“Data Page: Number of countries where same-sex marriage is legal”, part of the following publication: Bastian Herre and Pablo Arriagada (2023) - “LGBT+ Rights”. Data adapted from Pew Research Center. Retrieved from https://archive.ourworldindata.org/20260304-094028/grapher/same-sex-marriage-country-count.html [online resource] (archived on March 4, 2026).

How to cite this data

In-line citationIf you have limited space (e.g. in data visualizations), you can use this abbreviated in-line citation:

Pew Research Center (2025) – with major processing by Our World in Data

Full citation

Pew Research Center (2025) – with major processing by Our World in Data. “Number of countries where same-sex marriage is legal” [dataset]. Pew Research Center, “Same-sex marriage around the world - Pew Research Center” [original data]. Retrieved April 1, 2026 from https://archive.ourworldindata.org/20260304-094028/grapher/same-sex-marriage-country-count.html (archived on March 4, 2026).

Quick download

Download the data shown in this chart as a ZIP file containing a CSV file, metadata in JSON format, and a README. The CSV file can be opened in Excel, Google Sheets, and other data analysis tools.

Data API

Use these URLs to programmatically access this chart's data and configure your requests with the options below. Our documentation provides more information on how to use the API, and you can find a few code examples below.

Data URL (CSV format)
https://ourworldindata.org/grapher/same-sex-marriage-country-count.csv?v=1&csvType=full&useColumnShortNames=false
Metadata URL (JSON format)
https://ourworldindata.org/grapher/same-sex-marriage-country-count.metadata.json?v=1&csvType=full&useColumnShortNames=false

Code examples

Examples of how to load this data into different data analysis tools.

Excel / Google Sheets
=IMPORTDATA("https://ourworldindata.org/grapher/same-sex-marriage-country-count.csv?v=1&csvType=full&useColumnShortNames=false")
Python with Pandas
import pandas as pd
import requests

# Fetch the data.
df = pd.read_csv("https://ourworldindata.org/grapher/same-sex-marriage-country-count.csv?v=1&csvType=full&useColumnShortNames=false", storage_options = {'User-Agent': 'Our World In Data data fetch/1.0'})

# Fetch the metadata
metadata = requests.get("https://ourworldindata.org/grapher/same-sex-marriage-country-count.metadata.json?v=1&csvType=full&useColumnShortNames=false").json()
R
library(jsonlite)

# Fetch the data
df <- read.csv("https://ourworldindata.org/grapher/same-sex-marriage-country-count.csv?v=1&csvType=full&useColumnShortNames=false")

# Fetch the metadata
metadata <- fromJSON("https://ourworldindata.org/grapher/same-sex-marriage-country-count.metadata.json?v=1&csvType=full&useColumnShortNames=false")
Stata
import delimited "https://ourworldindata.org/grapher/same-sex-marriage-country-count.csv?v=1&csvType=full&useColumnShortNames=false", encoding("utf-8") clear