For violent crime, Oakland is number 11 and SF is number 37. They’re both higher for total crime and property crime, but I don’t imagine you care as much about property crime if you’re just a tourist.
You can see the list here: List of United States cities by crime rate - Wikipedia
Sort by the total in the violent crime section. It’s less dangerous than Cleveland, Milwaukee, or Indianapolis, but somehow those cities never show up in threads here about how the world is falling apart. Weird.