How do I make \hat{i} pretty?

I'm looking for a way to make the hat in \hat{i} replace the dot. I can't find anything on Google, and am seemingly too dumb to figure it out myself.

• Mabye \hat{\i}? – cgnieder Nov 19 '12 at 19:24
• – Peter Grill Nov 19 '12 at 19:37
• it seems I am having a bit of a problem, $\hat{\J}$ is simply the same as $\J$. Please help. – Devansh Parmar Jun 11 '20 at 13:46

The dotless i is available as \imath, and similarly \jmath for a dotless j:
\documentclass{article}
$\hat{\I}$, $\hat{\J}$