Surgical castration of male piglets is a common management practice conducted on commercial swine farms to prevent the occurrence of boar taint and aggressive behavior. However, the procedure of surgical castration causes acute pain-induced distress, which is an animal welfare concern. The objective of this study was to evaluate the use of two topical anesthetics to alleviate the pain caused by castration in piglets as measured by physiological and behavior indices of stress. At 3 days of age, 40 weight-matched piglets were allocated to one of four treatment groups. Treatments included: (i) sham castration (CON), (ii) surgical castration (CAS), (iii) castration and short-acting local anesthetic applied topically to the castration wound (SHORT) and (iv) castration and long-acting local anesthetic applied topically to the castration wound (LONG). Blood samples were collected from piglets before and 30, 60, 120 and 180 min after castration to measure leukocyte and differential counts and cortisol concentrations. The above experiment was repeated without blood collection and behavior was recorded for 30 min before and 180 min after castration or handling. Stress vocalizations were recorded during castration and handling. All piglets were weighed before and 24 h after castration and wound healing was recorded daily for the first 14 days after castration. Leukocyte counts and differentials did not differ (P > 0.05) among any of the treatments. Cortisol concentrations were elevated (P < 0.06) in CAS, SHORT and LONG piglets compared with controls 30 and 60 min after castration. The percentage of stress vocalizations was greater (P < 0.05) among castrated piglets compared with CON piglets, regardless of anesthetic treatment. Piglets that were castrated and not given a topical anesthetic spent more time (P < 0.05) lying without contact compared with piglets castrated and given a topical anesthetic, regardless of the topical anesthetic administered. Body weight change did not differ (P > 0.05) among treatments 24 h after castration or control handling and wound healing scores were greater (P < 0.05) in SHORT compared with CAS and LONG piglets 9 to 14 days after castration. In this study, the use of a short- or long-acting topical anesthetic was not effective in reducing the pain-induced distress caused by castration in piglets. Further research is needed to evaluate alternative practical methods to reduce the pain caused by the on-farm castration of piglets.