In this letter, we report a beam profile indicator for swift heavy ions (SHIs) which utilizes the afterglow of phosphors. Clear marks are left on SrAl2O4:Eu2+ and CaSrAl2Si2O8:Eu2+ samples by SHI irradiation through a permanent change of their afterglow intensity. The afterglow intensity of the SHI-irradiated areas has a Gaussian distribution. Moreover, afterglow intensity and irradiation fluence are linearly related, indicating that this type of indicator has good dose linearity. The results suggest that long-lasting phosphors are promising SHI beam profile indicators with high spatial resolution.