Every city has its own rules for riding on the sidewalk and it is not always clear when it okay or not to ride on the sidewalk.
This video will help you think about sidewalk riding in Palo Alto.
Most of the time you are much safer and pedestrians are much safer if you’re riding properly in the street about 6-8′ from the door zone of a parked car. You are more visible to drivers this way.
But occasionally bike riders and pedestrians need to share the same space.
1) If you ever must ride on the sidewalk watch out for car drivers not looking in the direction you are coming from at intersections or going in and out of driveways and not seeing you.
2) If you are sharing the space with pedestrians on a multi-use path or the sidewalk, use your best judgment to make sure it is safe for both you and the people walking. It’s much easier to cause a crash when you are riding in smaller spaces with many people, like on the sidewalk or multi-use path.
3) You can help people walking feel safer by slowing down, pausing, or getting off of your bike and walking. When you walk your bike you become a pedestrian.