In this study, we investigate how the baryonic effects vary with scale and local density environment mainly by utilizing a novel statistic, the environment-dependent wavelet power spectrum (env-WPS). With four state-of-the-art cosmological simulation suites, EAGLE, SIMBA, Illustris, and IllustrisTNG, we compare the env-WPS of the total matter density field between the hydrodynamic and dark matter-only (DMO) runs at z = 0. We find that the clustering is most strongly suppressed in the emptiest environment of $\rho _\mathrm{m}/\bar{\rho }_\mathrm{m}<0.1$ with maximum amplitudes ∼67 − 89 per cent on scales ∼1.86 − 10.96 hMpc−1, and less suppressed in higher density environments on small scales (except Illustris). In the environments of $\rho _\mathrm{m}/\bar{\rho }_\mathrm{m}\geqslant 0.316$ (≥10 in EAGLE), the feedbacks also lead to enhancement features at intermediate and large scales, which is most pronounced in the densest environment of $\rho _\mathrm{m}/\bar{\rho }_\mathrm{m}\geqslant 100$ and reaches a maximum ∼7 − 15 per cent on scales ∼0.87 − 2.62 hMpc−1 (except Illustris). The baryon fraction of the local environment decreases with increasing density, denoting the feedback strength, and potentially explaining some differences between simulations. We also measure the volume and mass fractions of local environments, which are affected by ≳ 1 per cent due to baryon physics. In conclusion, our results show that the baryonic processes can strongly modify the overall cosmic structure on the scales of k > 0.1 hMpc−1, which encourages further research in this direction.