The shooting was reported at about 7:20 p.m. in the 1300 block of Mendell Street.
The boy was walking in the area when he was shot twice in the abdomen, according to police.
He was taken to San Francisco General Hospital to be treated for his injuries, which are not considered life-threatening.
No arrests have been made in connection with the shooting.
Anyone with information about the case is encouraged to call the Police Department's anonymous tip line at (415) 575-4444 or send a tip by text message to TIP411.