Yes, you can buy a house with a friend in Ontario, and more Toronto buyers are doing it as prices outpace single incomes. The law lets any two or more people hold title together, whether or not they are related or married. What matters is how you structure the ownership, the mortgage, and the exit before you sign anything.
Ontario recognizes two ways to co-own property. Joint tenancy means equal shares with a right of survivorship, so if one owner dies, their portion passes automatically to the other. Tenancy in common lets each person hold a different percentage, and each share passes through that owner's will rather than to the co-owner. For friends buying together, tenancy in common is usually the better fit because it can mirror an uneven down payment and keeps each estate separate. Ontario law actually defaults to tenancy in common unless the paperwork clearly says otherwise, so it is worth reading up on joint tenancy versus tenancy in common before you decide.
The mortgage is where co-buying gets serious. When two friends borrow together, they are jointly and severally liable. That phrase means the lender can pursue either person for the entire balance, not only their half. If your co-owner loses a job or stops paying, the full amount is still your problem, and a missed payment lands on both credit reports. Pooling two incomes does help with qualifying, which is how some buyers who fall short on their own can reach the income needed to buy in Toronto as a pair.
Taxes work differently for friends than for spouses. Ontario's first-time buyer land transfer tax rebate is prorated by ownership share, so if one of you has owned a home before, only the eligible buyer's portion qualifies. In Toronto, where buyers pay both a provincial and a municipal land transfer tax, a qualifying first-time buyer can still claim up to $8,475 combined, but only against their own share.
The step most co-buyers skip is a co-ownership agreement. A real estate lawyer can draft one that spells out who pays what, what happens if someone wants out, and how a buyout gets priced. Sorting all of that while everyone is still friendly is far easier than sorting it out after something goes wrong.
Related reading: Joint Tenancy vs Tenancy in Common in Ontario, What Is a Co-Signer on a Mortgage in Canada?, and Land Transfer Tax Rebates for First-Time Toronto Buyers.