The robbery was reported at about 8 p.m. Monday near the intersection of Eighth and Howard streets.
The 31-year-old victim was walking down the street when he was approached by a man who hit him in the face with the bat, according to police.
The victim fell to the ground, and two suspects rummaged through his pockets, taking an undisclosed amount of cash, police said.
The suspects, both men in their 30s or 40s, ran away and had not been found as of this morning, according to police.
The victim was taken to San Francisco General Hospital to be treated for a contusion to his face. He is expected to survive.
Anyone with information about the robbery is encouraged to call the Police Department's anonymous tip line at (415) 575-4444 or send a tip by text message to TIP411.