The men, ages 25 and 27, were shot during a fight that involved several people outside the Lot 46 nightclub at 46 Geary St., near Market Street, just before 2 a.m., according to police.
During the fight, someone pulled a gun and fired several shots, police said.
The 25-year-old man was hit once in the thigh, and the 27-year-old man was shot twice in the hip, police said.
Both were driven by their friends to a nearby hospital then taken to San Francisco General Hospital, according to police. They are expected to survive.
There was no description of the suspect, and no arrests have been made.