Ocean Beach is the grand-daddy of San Francisco beaches, stretching out for three miles along the entire western edge of San Francisco. This wide, flat expanse of sand is the best beach for long walks or a run. It's also the most popular, which means lots of people on our warm, sunny days. This is a great surfing beach, and dogs can be off-leash in certain parts.
https://www.inside-guide-to-san-francisco-tourism.com/ocean-beach-san-francisco.html