In cities, the incidence of mental disorders is higher, while visits to nature have been reported to benefit mental health and brain function. However, there is a lack of knowledge about how exposure to natural and urban environments affects brain structure. To explore the causal relationship between exposure to these environments and the hippocampal formation, 60 participants were sent on a one hour walk in either a natural (forest) or an urban environment (busy street), and high-resolution hippocampal imaging was performed before and after the walks. We found that the participants who walked in the forest had an increase in subiculum volume, a hippocampal subfield involved in stress response inhibition, while no change was observed after the urban walk. However, this result did not withstand Bonferroni correction for multiple comparisons. Furthermore, the increase in subiculum volume after the forest walk was associated with a decrease in self-reported rumination. These results indicate that visits to nature can lead to observable alterations in brain structure, with potential benefits for mental health and implications for public health and urban planning policies.