Same-sex marriage is legalized in Sweden.

Same-sex marriage, also known as gay marriage, is the marriage of two people of the same sex. There are records of same-sex marriage dating back to the first century. In the modern era, marriage equality for same-sex couples was first legally acknowledged in the Netherlands on 1 April 2001, after royal assent was given by Queen Beatrix.As of 2022, same-sex marriage is legally performed and recognized in 30 countries (nationwide or in some jurisdictions) with the most recent being Chile in March 2022, and Switzerland starting 1 July 2022. Adoption rights are not necessarily covered, though most states with same-sex marriage allow those couples to jointly adopt. In contrast, 34 countries (as of 2021) have definitions of marriage in their constitutions that prevent same-sex marriage, most enacted in recent decades as a preventative measure. Some other countries have constitutionally mandated Islamic law, which is generally interpreted as prohibiting same-sex marriage. In six of the former and most of the latter, homosexuality itself is criminalized.

The application of marriage law equally to same-sex and opposite-sex couples (called marriage equality) has varied by jurisdiction, and has come about through legislative change to marriage law, court rulings based on constitutional guarantees of equality, recognition that same-sex marriage is allowed by existing marriage law, and by direct popular vote (via referendums and initiatives). The recognition of same-sex marriage is considered to be a human right and a civil right as well as a political, social, and religious issue. The most prominent supporters of same-sex marriage are human rights and civil rights organizations as well as the medical and scientific communities, while the most prominent opponents are religious fundamentalist groups. Polls consistently show continually rising support for the recognition of same-sex marriage in all developed democracies and in some developing democracies.

Scientific studies show that the financial, psychological, and physical well-being of gay people are enhanced by marriage, and that the children of same-sex parents benefit from being raised by married same-sex couples within a marital union that is recognized by law and supported by societal institutions. Social science research indicates that the exclusion of homosexuals from marriage stigmatizes and invites public discrimination against them, with research also repudiating the notion that either civilization or viable social orders depend upon restricting marriage to heterosexuals. Same-sex marriage can provide those in committed same-sex relationships with relevant government services and make financial demands on them comparable to that required of those in opposite-sex marriages, and also gives them legal protections such as inheritance and hospital visitation rights. Opposition to same-sex marriage is based on claims such as that homosexuality is unnatural and abnormal, that the recognition of same-sex unions will promote homosexuality in society, and that children are better off when raised by opposite-sex couples. These claims are refuted by scientific studies, which show that homosexuality is a natural and normal variation in human sexuality, and that sexual orientation is not a choice. Many studies have shown that children of same-sex couples fare just as well as the children of opposite-sex couples; some studies have shown benefits to being raised by same-sex couples.