There has been much speculation about a possible association between the social and built environment and health, but the empirical evidence is still elusive. The social and built environments are best seen as contextual concepts but they are usually estimated as an aggregation of individual compositional measures, such as perceptions on trust or the desirability to live in an area. If these aggregated compositional measures were valid measures, one would expect that they would evince correlations at higher levels of data collection (e.g., neighbourhood). The aims of this paper are: (1) to investigate the factor structure of a self-administered questionnaire measuring individual perceptions of trust, social participation, social cohesion, social control, and the built environment; (2) to investigate variation in these factors at higher than the individual level (households and postcodes) in order to assess if these constructs reflect some contextual effect; and (3) to study the association between mental health, as measured by the General Health Questionnaire-12 (GHQ-12), and these derived factors. A cross-sectional household survey was undertaken during May-August 2001 in a district of South Wales with a population of 140,000. We found that factor analysis grouped our questions in factors similar to the theoretical ones we had previously envisaged. We also found that approximately one-third of the variance for neighbourhood quality and 10% for social control was explained at postcode (neighbourhood) level after adjusting for individual variables, thus suggesting that some of our compositional measures capture contextual characteristics of the built and social environment. After adjusting for individual variables, trust and social cohesion, two key social capital components were the only factors to show statistically significant associations with GHQ-12 scores. However, these factors also showed little variation at postcode levels, suggesting a stronger individual determination. We conclude that our results provide some evidence in support of an association between mental health (GHQ-12 scores) and perceptions of social capital, but less support for the contextual nature of social capital.