What happens to your HSA if you switch to a health insurance plan that's not HSA-qualified? It's a good question, and understanding how the rules work for HSAs when you're no longer "HSA-eligible" will help you avoid potentially bad financial decisions.
First of all, "HSA-eligible" just means that you're eligible to contribute to an HSA. You can still own an HSA when you're not HSA-eligible. And you can still withdraw money from that HSA, tax-free as long as the money is used to pay for qualified medical expenses.
Being HSA-eligible includes having coverage under an HSA-qualified high-deductible health plan (HDHP), and with some limited exceptions, not having any other coverage. You also can't be claimed as a dependent on someone else's tax return. When you're HSA-eligible, you can contribute pre-tax money to your HSA, up to the annual limit set by the IRS.
But what happens if your health coverage changes to a non-HDHP (or no insurance at all), or you gain additional coverage, such as Medicare or FSA coverage from your spouse's employer? In that case, you're no longer HSA-eligible, which means you have to stop contributing to your HSA.
But that does not mean you should close your HSA!
You might have well-meaning friends (and possibly not such well-meaning car salespeople or mortgage brokers) encouraging you to cash it out, but chances are that's not your best choice. Of course, in a dire emergency, it may be the only option.
If cashing out your HSA is all that's standing between you and being homeless, then cash out the HSA. But if it's not an earth-shattering emergency, you're probably better off keeping your HSA.
If you close your HSA and withdraw all the money, you're going to have to pay income tax on the withdrawal, plus a 20% additional tax if you're under age 65. That's assuming you aren't using the money to reimburse yourself for qualified medical expenses incurred since you established your HSA. If you are using the money for qualified medical expenses, then carry on, as the withdrawal will be tax-free.
The other option, even though you're no longer HSA-eligible, is to ask yourself if you think you might have any medical expenses during the rest of your life. If so, remember that you can just leave the money in your HSA and wait to withdraw it until those medical expenses crop up — even if that ends up being decades down the road. The withdrawal will be tax-free at that point, including investment gains or interest that the account balance earns between now and then.
If you never have HDHP coverage again, your HSA will be a one-way street: Withdrawals only, but no contributions (although the balance could continue to grow due to interest or investment earnings). But keep in mind that you might become HSA-eligible again in the future. At that point, you can simply start contributing to your HSA again.
Consider moving it instead...
From a logistical standpoint, remember that you also have the option to move your HSA balance to a different HSA provider. If your HDHP/HSA was established via an employer and you're leaving that job, the employer may require you to move your HSA. But that does not mean you need to close your HSA. Instead, you can just initiate a transfer or a rollover to a new HSA, which won't trigger any taxes on your HSA funds.
A rollover means the original HSA sends the money to you, and you send it to your new HSA custodian within 60 days. You can't do this more than once a year, and the onus is on you to ensure that you deposit the money in your new HSA within 60 days.
A simpler way to go about it is a transfer. You just need to open your new HSA and then ask your original HSA to send the money directly to the new HSA. There's no limit on how often you can transfer money from one HSA to another, and you don't need to worry about getting the money into your new HSA in a timely fashion — the two HSA administrators take care of all the logistics for you.
Seek advice from a tax adviser if you have questions about your specific situation, but remember that keeping your HSA (with your current HSA custodian or a new one) after you're no longer HSA-eligible is almost always going to be a better option than cashing it out.