More and more Americans are using a health savings account (HSA) to supplement their retirement savings: As of June 2016, people had opened 18.2 million HSAs, a 25 percent increase from the previous year.
"It's kind of like this retirement loophole trick," certified financial planner Nick Holeman tells CNBC Make It.
While HSAs are not intended to be used for retirement — they're designed for you to use to pay for qualifying healthcare expenses — they're a tax-friendly investment vehicle and can act as a powerful retirement-savings tool if you let your balance compound over years.
In fact, depending on your situation, some financial planners advise maximizing contributions to your HSA even before maxing out your 401(k) plan.
Here's everything you need to know about HSA's.

You have to have a high-deductible health care plan (HDHP)
The main requirement for opening an HSA is having a high-deductible health care plan (HDHP), one that offers a lower monthly health insurance premium and a high deductible.
This year, that means you'll have to pay a minimum deductible of $1,300, or $2,600 for families. The maximum annual out-of-pocket costs for these plans are $6,550, or $13,100 for families.
HDHP's aren't for everyone, Holeman notes: "If you are on medications, have a chronic illness or if you're older — anything where you might be going to the doctor a lot — then having a high-deductible will probably be very expensive for you.
"Typically, it only makes sense if you're healthy and you don't use the doctor very often."
Before signing up for an HDHP, you'll want to sit down and ask yourself a few questions, says Holeman: "How often do you go to the doctor? Do you have a safety net that's large enough so that if you do need to pay the high-deductible, you can pay that out of pocket without having to eat rice and beans for a month?"

There's a contribution limit
Like all tax-advantaged accounts, there's a cap on how much you can contribute each year. The HSA contribution limit is $3,400 per year if you're single and $6,750 per year if you have a family. If you're 55 or older, you can make an additional $1,000 "catch up" contribution.
"It's less money that you can put into that account [than other retirement savings vehicles]," says Holeman. "So this account alone is not going to be nearly enough for you to save for your retirement, but it can be a nice addition to your normal retirement savings."
With a 401(k) plan, the contribution limit is $18,000 if you're under age 50 and $24,000 if you're 50 or older. For traditional and Roth IRAs, the maximum yearly contribution is $5,500, or $6,500 for people age 50 or older.
You deposit pre-tax dollars
Like an IRA or 401(k), you contribute pre-tax dollars and let that money grow tax-deferred over time. You'll pay taxes only when you withdraw the money.
If you're withdrawing the funds for qualified medical expenses, you get to take it out, tax-free.

If you withdrawing early, you could incur a penalty
You can withdraw funds tax-free at any time for qualified medical expenses, but if you use the funds for non-healthcare expenses before age 65, you'll owe a 20 percent penalty.
After age 65, you can make withdrawals to cover non-medical expenses. As with an IRA, the money will be taxed as income.
Fees and investment options matter
If you're using an HSA to save for retirement, fees and investment options matter, so you'll want to shop around.
"HSAs should be treated no differently from other retirement funds in terms of investing," certified financial planner Rose Swanger told CNBC's Tom Anderson.
Since your HSA is not tied to your employer like a 401(k), you can choose whatever provider you want. When shopping around, pay attention to account fees and note that some accounts will require a minimum balance.
HSASearch lets you compare more than 400 providers.
Like this story? Like CNBC Make It on Facebook
Don't miss: Everything you need to know about 401(k)'s, IRAs and other retirement savings accounts
