Alonso was in the starting lineup for the first time since May 31 as the Padres played the Giants in the second game of a four-game series at Petco Park.
"Everything feels good. We did all the things we needed to do to feel good," Alonso said. "It's good to be back."
Alonso was hitting .284 with six home runs and 29 RBIs in his first 190 at-bats before he was hit with a pitch on the right hand in an Interleague game against the Blue Jays.
"He was on a pretty consistent start; his numbers were holding their own," said Padres manager Bud Black. "It was a bummer it was interrupted by the broken hand."
At first, Alonso tried to rest the hand and he received treatment. Finally, he went on the disabled list June 4, retroactive to May 31.
Alonso appeared in four games with Triple-A Tucson this week on a rehabilitation assignment, collecting eight hits in 14 at-bats. Black said Thursday there was a "high probability" Alonso would be back for Friday's game.
Alonso felt like he turned a corner, mentally at least, when he got his first at-bat with Tucson on July 8.
"After that first at-bat, taking that first swing, once I got past that, I knew I was going to be fine," he said.
Joining Alonso on the active roster Friday was second baseman Jedd Gyorko, who was reinstated from the disabled list after missing 30 games with a right groin strain.
Infielder Pedro Ciriaco was designated for assignment, pitcher Clayton Richard -- who will have surgery on his left shoulder next week -- was moved from the 15-day disabled list to the 60-day DL and pitcher Miles Mikolas was optioned to Tucson. Ciriaco was out of Minor League options.
Pitcher Sean O'Sullivan had his contract purchased so he could be added to the 40-man roster. He got the start Friday against the Giants.
Ciriaco, who filled in at shortstop for an injured Everth Cabrera, hit .238 in 63 at-bats. The Padres hope to retain him and send him to Triple-A.
Richard will have surgery to shave down his left clavicle so he no longer has trouble with his left AC joint. He'll miss the rest of the season, finishing 2-5 with a 7.01 ERA.
Mikolas pitched a scoreless inning in Thursday's loss to the Giants, his lone appearances with the team in 2013.
The Padres now have 39 players on their 40-man roster.