Context. Properties of galaxies depend on their large-scale environment. As the influence of active galactic nuclei (AGN) in galaxy evolution is becoming more evident, their large-scale environments may help us understand the evolutionary processes leading to activity. The effect of activity can be seen particularly by showing whether different types of active galaxies are formed by similar mechanisms. Aims. Our aim is to study the supercluster-scale environments of active galaxies up to redshift 0.4. Our data include quasars, BL Lac objects, Seyfert, and radio galaxies. Methods. We used a three-dimensional, low-resolution luminosity-density field constructed of a sample of luminous red galaxies in the seventh data release of the Sloan Digital Sky Survey. We calculated the average density of this field in a volume of a 3 h −1 Mpc sphere around each AGN for estimating the environmental density levels of different types of AGN. This analysis gives us the distribution of AGN in the global environment of superclusters, filaments, and voids. Results. Our results show that, while radio-quiet quasars and Seyfert galaxies are mostly located in low-density regions, radio galaxies have higher environmental densities. BL Lac objects usually have low-density environments, but some of them are also in very high-density regions. Conclusions. Our results give support to the theory of galaxy evolution where galaxies are affected by two modes of AGN feedback: quasar mode that turns a blue star-forming galaxy into a red and dead one, and radio mode that regulates the growth of massive elliptical galaxies. We conclude that quasars are in lower density environments than radio galaxies, most likely because the galaxies in rich environments have evolved to a state suitable for radio-loud activity earlier. Galaxies in poor environment have evolved more slowly, and are still going through the earlier quasar-mode feedback in galaxy evolution.