  For an irreducible character $\chi$ of a finite group $G$, the codegree of
$\chi$ is defined as $|G:\ker(\chi)|/\chi(1)$. In this paper, we determine
finite nonsolvable groups with exactly three nonlinear irreducible character
codegrees, and they are $\mathrm{L}_2(2^f)$ for $f\ge 2$, $\mathrm{PGL}_2(q)$
for odd $q\ge 5$ or $\mathrm{M}_{10}$.
