Tapping the equity in your home can be a good way to access cash quickly, but you should have a good reason for doing so. After all, you’re borrowing against the roof over your head.

So whether you get a cash-out refinance, home equity loan or home equity line of credit (HELOC), you must use caution. Here are five common ways to spend home equity money, along with the potential dangers.

1. Make home improvements

Home improvement is one of the main reasons homeowners take out equity loans or lines of credit. Besides making a home more comfortable and attractive to live in, upgrades could raise its value.

But if you plan to sell the house, be mindful of the types of improvements you make. A common mistake is using home equity to add a giant TV or some feature that does not really increase the value of the home, says Rick Sharga, executive vice president of Carrington Mortgage Holdings in Orange County, California.

“If you’re thinking about selling your house soon, you want to be cautious about how much you spend on what because there’s a limit to how much you can get over the market value on a house,” Sharga says.

“Most real estate folks will say new paint and carpeting, and maybe some upgrades to the kitchen or bathrooms help the value of the house.”

2. Pay for education

A HELOC or home equity loan can be a good way to fund a college education because the interest rate might be lower than the rate on a student loan.

“Paying for education to potentially put yourself in a higher income bracket — that’s a huge positive for using home equity,” says George Pantelaras, director of consumer direct/internet production at Planet Home Lending in the Tampa area.

Before tapping your home equity, however, look at all of the options for student loans, including the terms and interest rates. Defaulting on a student loan will only hurt your credit, but if you default on a home equity loan, you could lose your house.

3. Pay off credit cards or other debts

HELOCs or a home equity loan can be used to consolidate debts to a lower interest rate. Homeowners will often use home equity to pay off other personal debts such as a car loan or a credit card.

This can become dangerous, however, if the homeowner runs up the credit cards again after using home equity money to pay them off.

“If you’re planning on tapping home equity to pay off debt, there better be a good management plan in place,” Pantelaras says.

Also, there are closing costs on a home equity loan or HELOC, so you need to look at how much it will cost overall to borrow against your equity.

“You’re paying a lot of money upfront to pay off the other debt, so it’s got to make financial sense,” Pantelaras says.

4. Invest the money

Some homeowners use home equity to invest in the stock market or real estate, expecting the returns to exceed the cost of the HELOC or line of credit.

This has risks, however, because there are no guarantees the stock market will perform as well as expected.

Similarly, if you use home equity to invest in real estate, you can’t be certain the investment property will be bring in more than what you put into it.

“People tend to sometimes overvalue a property they want to invest in or underestimate the costs involved,” Sharga says. “It’s really abut financial management and whether it makes sense to start with other investors or real estate professionals.”

5. Take a fancy vacation, buy an expensive toy

Most lenders and financial advisers agree that the worst reason to tap home equity is for unnecessary personal expenses such as an extravagant vacation or a boat.

“These were the things people got in trouble with during the housing market boom,” Sharga says. “They used their house as an ATM.”

Bottom line: When it comes to your home equity, don’t borrow more than you need and don’t overspend