San Francisco is not much of a late night town. Public transit closes around 12:30 a.m., although there is one late-night bus per hour (called the "Owl") after that time. However, there are some late-night things to do in San Francisco.
The Mission is San Francisco's Hipster neighborhood. You'll find its residents out partying till all hours. Some popular bars include: Medjool, Zeitgeist and Beauty Bar.
Professional cooks off the clock head to NOPA (named for San Francisco's North of the Panhandle neighborhood) for late-night burgers and delicious food. For the food-obsessed, NOPA line cook Richie blogs about his professional experience at linecook415, listed in the Resources section. Posthoc provides a directory of late-night dining in San Francisco.
Explore Folsom Street's Leather district at these two popular leather bars, The Eagleand The Stud. The Castro district also has plenty of gay bars for travelers not interested in the leather scene. CastroSF, in the Resources section, provides a directory of Castro bars.
The Endup, located in San Francisco's SOMA district, is the best choice for late-night dancing.
At night, the Italian neighborhood of North Beach opens up its topless bars and dance clubs. Some offer women free admission. Most fill up with rowdy frat boys. Still, North Beach offers some interesting people-watching and late-night eats and drinks.