The move means that both mixed-sex and same-sex couples can now choose whether to marry or enter a civil partnership.
Previously, only same-sex couples could become civil partners.
Civil partnership and marriage are almost identical, and civil partners have the same rights and responsibilities as married partners.
But there are some very small procedural differences.
What's the difference?
Civil partnerships are registered by signing the civil partnership schedule, with no words required to be spoken, whereas marriages are solemnised by saying a prescribed form of words.
To register a civil partnership, a person and their partner must sign a civil partnership document in front of two witnesses and the person registering the civil partnership.
In some situations, a couple who haven't registered a civil partnership will have the same legal rights and responsibilities as a couple who have registered a civil partnership. This is the case, for example, when working out entitlement to welfare benefits and tax credits.
Once you've registered a civil partnership, it can only be ended if one of you dies or by applying to court to bring the partnership to an end.
It's possible for a couple to convert a qualifying civil partnership into a marriage. This can be done by a simple administrative process or by having a full marriage ceremony. The civil partnership will end on the conversion.
Scotland's Minister for Equalities Christina McKelvie said this week: "I welcome the introduction of civil partnerships for all couples.
"We have now embedded equality of choice on how to formalise their relationship in the way that best reflects their beliefs and ensures access to the rights, responsibilities and benefits which flow from entering a legally-recognised relationship.
"This ground-breaking change in law demonstrates our commitment to creating a fairer and more inclusive society for all."
A ruling in the Supreme Court in 2018 found that existing UK law went against the European Convention on Human Rights on equality grounds.
Equal Civil Partnerships campaigned for a change in the law in England and Wales, where mixed-sex civil partnerships were introduced at the end of 2019.
A spokesperson for the group said: "Mixed-sex civil partnership is a modern, baggage-free alternative to marriage.
"It allows a couple to choose the legal and financial protection for themselves and their family in the same way that marriage does, but without the historical and patriarchal connotations that put many couples off.
"We are delighted that Scotland now allows mixed-sex couples to form this legal relationship and that is now available throughout Great Britain."