The magnetocaloric effect (MCE) and critical behavior in the REPtMg (RE = Tb, Dy and Ho) intermetallic compounds around Curie temperatures Tc were investigated by magnetization measurements. All the REPtMg compounds exhibit pronounced MCE performance with the maximum magnetic entropy change (-Delta S-M(max)) values up to 5.1, 7.2, 10.2 J/kg K under the magnetic field change (Delta H) of 0-5 T around Tc of 58, 29, and 20 K for RE = Tb, Dy and Ho, respectively. The reasonable and accurate critical exponents for the present REPtMg series compounds for RE = Tb, Dy and Ho obtained by the Delta H dependence of Delta S-M method are evaluated to be beta = 0.4691, 0.4681, 0.4141, gamma = 1.0412, 1.0482, 1.1067 and delta = 3.2196, 3.2393, 3.6728 around T-c, which are verified by the Widom scaling law and scaling equations, respectively.