The aim of this study was to estimate the prevalence of Toxoplasma gondii infection in dogs in Shanghai, China. A total of 1,736 sera (1,178 from the city center and 558 from the outskirts) was collected from healthy dogs and tested for T. gondii infection by indirect hemagglutination; 56 sera (3.2%) were considered positive, with titers >1∶64. The seroprevalence in dogs from the outskirts of the city (town dogs, 6.0%; countryside dogs, 9.8%) was significantly higher (P > 0.05) than that in city center dogs (1.3%). The age of the dog has an apparent association with T. gondii infection; that is, the seroprevalence ranged from 1.9% (in dogs ≤1 year old) to 3.6% (in dogs >5 years old). There was no significant difference in gender (P ≥ 0.05), that is, 1.4% versus 1.1% for male and female dogs in the city center, 6.2% versus 5.9% in town dogs, and 8.4% versus 11.5% in country dogs, respectively. These results suggest that T. gondii infections are common in dogs from the city center and outskirts of Shanghai, but the T. gondii seroprevalence in dogs is considerably lower than in other regions in PR China. The presence of T. gondii DNA was investigated by nested PCR on 110 blood samples from city center dogs, but no positive samples were found, which may suggest that there were no acute infections of T. gondii in the city center samples. Our results indicate that the control and treatment of toxoplasmosis in Shanghai has been effective. However, it is still essential to further implement integrated strategies to prevent and control T. gondii infection in dogs in both the city center and the outskirts.