Small mammals are suspected of contributing to the dissemination of Toxocara canis and helping with the parasite survival during periods when there is a temporary absence of suitable definitive hosts. While the primary aim of the current study was the assessment of seroprevalence of Toxocara spp. infections in wild rodents in Poland, we also explored the role of intrinsic (sex, age) and extrinsic factors (study site) influencing dynamics of this infection to ascertain whether grassland versus forest rodents play a greater role as indicators of environmental contamination with T. canis. We trapped 577 rodents belonging to four species (Myodes glareolus, Microtus arvalis, Microtus agrestis, Alexandromys oeconomus) in north-eastern Poland. Blood was collected during the parasitological examination, and serum was frozen at − 80 °C until further analyses. A bespoke enzyme-linked immunosorbent assay was used to detect antibodies against Toxocara spp. We found Toxocara spp. antibodies in the sera of all four rodent species with an overall seroprevalence of 2.8% [1.9–4.1%]. There was a significant difference in seroprevalence between vole species, with the grassland species (M. arvalis, M. agrestis and A. oeconomus) showing a 16-fold higher seroprevalence (15.7% [8.7–25.9%]) than the forest-dwelling M. glareolus (0.98% [0.5–1.8%]). We hypothesise that the seroprevalence of Toxocara spp. differs between forest and grassland rodents because of the higher contamination of grasslands by domestic dogs and wild canids. Our results underline the need for wide biomonitoring of both types of ecosystems to assess the role of rodents as indicators of environmental contamination with zoonotic pathogens.