This guide is for general information only and is not legal advice. Laws change — verify current rules with your state DOT or a licensed attorney before relying on this for any legal matter. Read full disclaimer.
The rule
There is no statewide rule on sidewalk cycling — it is left to cities and counties in Maryland. Md. Transp. § 21-1207 leaves sidewalk regulation to local jurisdictions and the Maryland State Highway Administration: bicycles may be ridden on sidewalks where signs permit and where local ordinance has not prohibited it. Baltimore City prohibits sidewalk riding for anyone over 12 in business districts; Montgomery County permits it everywhere except where signed; Ocean City bans it on the boardwalk between 10 a.m. and 10 p.m. in summer. See Md. Transp. § 21-1207 (Riding on sidewalks; equipment).
Because Maryland doesn't set a statewide rule, the answer is "it depends on the city." Central business districts, downtown cores, and school zones are the most commonly restricted areas. Always check the local municipal code before you ride on a sidewalk.