BACKGROUND: It has been suggested that the COVID-19 pandemic has worsened socioeconomic disparities in access to primary care. Given these concerns, we investigated whether the pandemic affected visits to family physicians differently across sociodemographic groups. METHODS: We conducted a retrospective cohort study using electronic medical records from family physician practices within the University of Toronto Practice-Based Research Network. We evaluated primary care visits for a fixed cohort of patients who were active within the database as of Jan. 1, 2019, to estimate the number of patients who visited their family physician (visitor rate) and the number of distinct visits (visit volume) between Jan. 1, 2019, to June 30, 2020. We compared trends in visitor rate and visit volume during the pandemic (Mar. 14 to June 30, 2020) with the same period in the previous year (Mar. 14 to June 30, 2019) across sociodemographic factors, including age, sex, neighbourhood income, material deprivation and ethnic concentration. RESULTS: We included 365 family physicians and 372 272 patients. Compared with the previous year, visitor rates during the pandemic period dropped by 34.5%, from 357 visitors per 1000 people to 292 visitors per 1000 people. Declines in visit volume during the pandemic were less pronounced (21.8% fewer visits), as the mean number of visits per patient increased during the pandemic (from 1.64 to 1.96). The declines in visitor rate and visit volume varied based on patient age and sex, but not socioeconomic status. INTERPRETATION: Although the number of visits to family physicians dropped substantially during the first few weeks of the COVID-19 pandemic in Ontario, patients from communities with low socioeconomic status did not appear to be disproportionately affected. In this primary care setting, the pandemic appears not to have worsened socioeconomic disparities in access to care.