Hydrogen peroxide helps soften the skin around an ingrown toenail and prevent infection, making it less painful.