We have developed an efficient colorimetric method for alkaline earth metal ions using silver nanoparticles functionalized with thioglycolic acid as probe. This probe selectively recognizes alkaline earth metal ions through a distinct visual color change from yellow to red.