We compared relative impacts of habitat type vs. location in the diet of a generalist omnivore, the raccoon (Procyon lotor). Raccoon diets were analyzed from 161 scat samples collected in a marine coastal habitat over 13 mo. We used a suite of statistical tools including univariate indices of diversity, descriptive statistics, niche similarity analyses, and two contrasted randomization algorithms with Monte Carlo to test whether raccoons maintained similar diets in different habitats. We compared these results to raccoon diet studies in geographically distant locations with similar habitats to relevant studies conducted geographically closer but with different habitats. Logistic regression analyses revealed that among habitat similarity, geographic closeness, and diet diversity (i.e., relative dietary specialization of each population), only habitat similarity significantly (and positively) influenced probability of observing a greater-than-expected diet similarity. This demonstrated that raccoons in similar habitats had similar diets, with substitution of ecologically equivalent prey species.