Don’t live in SF, but was a frequent visitor. During the day you’ll be fine if you don’t look like a dumb tourist and mind your own business. Some of SF’s main cultural attractions are in “rough” neighbourhoods like Chinatown. As night falls and the street life thins out, you probably don’t want to wander the areas like the tenderloin or most dark red places on this map: https://gisgeography.com/san-francisco-crime-map/ but even the vast majority of the crime there is petty. You’re still unlikely to be a victim of violent crime, but the chances are higher that you’ll be assaulted by somebody desperate for a fix.
The actual violent crime rates in SF are still below the national average, but the drug issues are just very, very visible.
The actual violent crime rates in SF are still below the national average, but the drug issues are just very, very visible.