So, you’re drowning in high-interest credit card debt and personal loans? You’ve also got some good equity built up in your home? Maybe you’re thinking about leveraging today’s still-low mortgage rates and refinance to pay off debt.

It’s a tempting idea. And sometimes it makes sense. But shifting high-interest, unsecured debt onto your mortgage can also have nasty consequences.

So, before you start filling out the paperwork for a home equity loan or cash-out refinance, there are a few things to consider.

1. Are you willing to put your home on the line?

First and foremost, you need to understand what’s at stake with this strategy.

Right now, your high-interest debts are probably unsecured. That means the creditors can’t easily take property if you fail to make payments. (This is, after all, one reason the interest payments are so high!)

If you transfer this unsecured debt to a mortgage, home equity loan, or HELOC, you’ll be putting your home on the line. This move will likely increase your monthly mortgage payment. And if you get into a situation where you can’t pay, the bank may foreclose on your home.

Related: Factors to Consider Before Using a HELOC for Your Emergency Fund

Of course, this isn’t necessarily a deal breaker. Oftentimes, your overall payments can drop significantly when you use your mortgage to refinance your high-interest debts. But it’s still the first thing to consider.

Unless you’re in a good place income-wise to handle those mortgage payments, steer clear of this option.

2. What’s the real difference in interest paid?

Another consideration is how much the refinancing process will actually save you.

At first glance, maybe it looks like you’ll cut your interest payments by half or more. After all, you’re refinancing a $15,000 debt with an 18% interest rate to an interest rate of 4%.

Remember, when you roll your debt into your mortgage, you’ll likely make payments on it over a much longer time period. This means you could wind up paying the same or more in interest, even with a massive interest rate reduction.

Here’s an example of how refinancing a high-interest personal loan into a long-term home equity loan might work out:

  • Personal Loan Debt: $15,000 at 18% interest and a $300 minimum monthly payment
  • Home Equity Loan: $15,000 at 4% interest for 30 years

Switching to a home equity loan will dramatically decrease your monthly payment to about $72, according to this calculator. With the home equity loan, you’ll pay about $10,780 in interest. If you stick with the personal loan, this calculator says you’ll pay about $12,934 in interest.

So that’s better, right? Well, be sure you consider the next point before you decide.

Related: Strategies to Pay off Your Mortgage Early

3. What additional costs will you pay?

Whether you decide to refinance your home, open a HELOC, or take out a home equity loan, you’ll likely get stuck paying some up-front fees. The fees vary depending on what type of loan you’re considering.

Related: Should You Refinance from a 30-Year to a 15-Year Mortgage?

HELOCs have a higher interest rate than refinancing or taking out a home equity loan, typically. But they also come with lower fees if you shop around for the best offer.

Home equity loans and refinancing will both charge fees — often very similar to buying a home in the first place. Depending on the process, you could pay a couple hundred to a few thousand dollars in fees to refinance your debt.

You can avoid these additional costs, or at least mitigate them, by shopping around. Also, understand that home equity loans and lines of credit may have lower fees — though higher interest rates — than if you decide to complete a cash-out refinance.

4. How much is your home worth?

Of course, it’s important to know what your home is worth versus what you owe on it. When lenders are considering you for a second mortgage or a cash-out refinance, they’ll look at this closely.

While you can sometimes get a first mortgage with less than 20% equity in the home, you probably won’t be able to get a second mortgage under those circumstances. In other words, if your home is worth $100,000 and you still owe $80,000, you’re out of luck.

Learn More: How Big of a Down Payment Do You Need to Buy a Home?

Even if you do have enough equity in your home, leveraging it to refinance debt isn’t always the best option.

In fact, these situations were what got many homeowners into big trouble before the last housing crash. People tapped deeply into their equity during a time of inflated home prices. When that bubble burst and home prices plummeted, they were suddenly underwater on their homes.

That meant they owed more than their homes were actually worth.

Being underwater is tough. It means you likely can’t sell the house without paying to get out of your mortgage. And it makes even refinancing to get a lower rate difficult, if not impossible.

It can be hard to tell if you’re in a housing bubble that’s about to burst. But it’s important to get a feel for realty prices and trends in your area before deciding to refinance. Not sure where realty prices are going in your area? Check with a local realtor to get a feel for the current trends.

Resource: 11 Little-Known Facts About Home Appraisals

5. Are you planning to move in the near future?

If you’re thinking about moving in the next few years, rolling your debt into your mortgage could be a bad idea. The closer you are to moving, the more difficult it will be to recoup your refinancing costs.

Calculators like this one can help you figure out how much you’ll save. If refinancing your debts with your mortgage saves you $10,000 over a 15-year period, that’s great.

But what if you move within two years, and you’ve just paid $3,000 in closing costs? In that case, you’re probably going to lose money rather than saving it.

6. Will you just go into debt again?

Finally, be sure that you consider what got you into this much debt in the first place.

Maybe you had an unexpected accident and were unable to work for a few months. If you had a good track record of money management before this point, maybe refinancing makes sense. Stick to your old habits, and you’ll soon be in good shape once again.

But if overspending yourself into hefty debt is a recurring problem, this may not be the path for you. Remember, rolling your unsecured debt into your home puts your home on the line. If you then run up debts again because your habits haven’t changed, you’ll be stuck with a bigger mortgage payment and hefty credit card debt.

Related: 23 Powerful Tips and Tools to Eliminate Debt

Whether or not you should use your mortgage to refinance your debts is completely situational.  When making a decision, be sure to check current mortgage rates.

Sometimes, it truly makes sense as a way to save money and accelerate your journey to debt freedom. But sometimes, it’s just going to get you into more trouble than it’s worth.