The main results of this paper concern sharp constant of the Trudinger–Moser inequality in \(\mathbb {R}^{2}\) for Aharonov–Bohm magnetic fields. This is a borderline case of the Hardy type inequalities for Aharonov–Bohm magnetic fields in \(\mathbb {R}^2\) studied by A. Laptev and T. Weidl. As an application, we obtain the exact asymptotic estimates on best constants of magnetic Hardy–Sobolev inequalities. In order to achieve our goal, we introduce a new operator \(T_{a}\) on the unit circle \(\mathbb {S}^{1}\) and give the asymptotic estimates of the heat kernel \(e^{tT_{a}}\) via the Poisson summation formula. Finally, we show that such Trudinger–Moser inequalities in the unit ball \(\mathbb {B}^{2}\) can be improved via subtraction of an additional Hardy term to derive a Hardy–Trudinger–Moser inequality.