If every compact set is closed, then is the space Hausdorff?

I know that in a Hausdorff space, every compact set is closed.

However, is it true that if every compact set is closed, then the space is necessarily Hausdorff?


I’m answering the question in the title. Let $X$ be an uncountable set, and let $\tau$ be the co-countable topology on $X$. The compact sets in $\langle X,\tau\rangle$ are precisely the finite sets, which are all closed, but $X$ is not Hausdorff.