If your spouse is the designated beneficiary
If your spouse is the designated beneficiary of your HSA, the account will be treated as your spouse’s HSA after your death. This means that your spouse will be able to use the funds for eligible medical expenses even if he or she does not have an HSA-qualified health plan. Of course, only eligible individuals can contribute to an HSA, but anyone with an HSA, including your spouse after your death, can spend the funds whether they’re eligible or not.
If your spouse is not the designated beneficiary
The account stops being an HSA, and the fair market value of the HSA becomes taxable to the beneficiary in the year in which you die.
If your estate is the beneficiary, the value is included on your final income tax return.
The amount taxable to a beneficiary other than the estate is reduced by any qualified medical expenses for the decedent that are paid by the beneficiary within 1 year after the date of death.