In most cases, yes. The vast majority of people who file bankruptcy keep their homes. But the specifics depend on which chapter you file, how much equity you have, and whether you're current on your mortgage.

Chapter 7 and your house: Your home is protected up to your state's homestead exemption amount. If your equity in the home is below the exemption threshold, you keep the house. Equity is calculated as: home's current market value minus what you owe on the mortgage minus any other liens.

For example: Your home is worth $300,000. You owe $260,000 on the mortgage. Your equity is $40,000. If your state's homestead exemption is $50,000 or more, the house is fully protected and you keep it.

States like Texas and Florida have unlimited homestead exemptions, meaning you keep your home regardless of equity. Others, like New Jersey (which has no state homestead exemption), require you to use the federal exemption of about $27,900 (this amount adjusts periodically).

Even in Chapter 7, the bankruptcy only discharges your personal liability on the mortgage debt. The lien stays on the house. You must continue making mortgage payments to keep the property. If you stop paying, the lender can still foreclose.

Chapter 13 and your house: This is where Chapter 13 really shines for homeowners. If you're behind on mortgage payments, Chapter 13 lets you catch up on the arrears over 3 to 5 years while continuing to make current payments. The lender cannot foreclose as long as you're making the plan payments and staying current on ongoing mortgage obligations.

Chapter 13 also allows "lien stripping" in some situations. If your home is worth less than what you owe on the first mortgage, you may be able to eliminate ("strip off") a second mortgage or home equity line of credit entirely. The second lien gets treated as unsecured debt in the plan and can be discharged at the end.

When you might lose the house:

Your equity exceeds the homestead exemption in Chapter 7 (the trustee could sell it to pay creditors the non-exempt portion). You can't make the mortgage payments going forward, regardless of which chapter you file. You're already deep in foreclosure and can't cure the arrears through a Chapter 13 plan.

The strategic choice: If keeping your house is your primary goal and you're behind on payments, Chapter 13 is almost always the better option. If you're current on the mortgage and your equity is within exemption limits, Chapter 7 lets you keep the house while discharging other debts quickly.