You can use Chapter 7 bankruptcy to save your house if both of the following are true:
If you're not current on your payments, Chapter 7 bankruptcy will be only a temporary remedy unless you can modify your loan, which isn't guaranteed. The lender will be able to proceed with a foreclosure within two or three months. Instead, you should explore Chapter 13 bankruptcy, which provides a way for you to keep your house by spreading out your missed payments over several years.
Suppose you're current on your payments but expect to fall behind very shortly. Perhaps your mortgage interest rate is due to reset higher, or you've reached the principal cap on an interest-only loan. It could be that you have just lost some work hours or been laid off. In these and similar situations, filing for Chapter 7 could be a big help. Except for a few categories of debt, you can eliminate virtually all your unsecured debt, such as credit card debt, personal loans, medical debts, money judgments, and car repossession deficiencies, in about four months. You can even stop paying them before you file (but be sure that you qualify first—it can be hard to catch up once you fall behind).
Once your unsecured debt load is eliminated or greatly reduced, you will have a much better chance of paying your mortgage.
In every Chapter 7 case, the bankruptcy trustee looks for property to sell for the benefit of the creditors. The trustee will only be interested in selling the property that would produce money for the creditors. In other words, property that you own outright or in which you have equity. The trustee will subtract the following from the property's value:
If a reasonable amount of money would remain, the trustee will go forward with the property sale. Selling property worth less than the amount owed to a secured lender or fully protected by an exemption wouldn't net any money for creditors. In that case, the trustee wouldn't sell it and you'd get to keep it (you'd still have to pay any outstanding loans against it).
Most states let you keep at least some home equity when you go through Chapter 7 bankruptcy. Protection for home equity varies dramatically from state to state. As of March 2021, you get, for example:
Some states allow you to choose between the state and federal list—you'd pick the list that's most advantageous to you. And in California, you can choose between two state lists. (If you haven't resided for at least two years in the state where you file for bankruptcy, however, you must use the exemptions for the state where you resided previously.)
If your equity is less than the protected amount and you're current on your payment, you should be able to keep your house when you go through Chapter 7 bankruptcy.
To find out if filing bankruptcy might be right for your situation, talk to a bankruptcy lawyer.