In this paper, measurements of small scale electron density fluctuations in low confinement (L)-mode and high confinement (H)-mode plasmas obtained by collective scattering of infrared light are presented. A single discharge in the Wendelstein 7-AS (W7-AS) stellarator (Renner H et al 1989 Plasma Phys. Control. Fusion 31 1579) was studied. The plasma developed from steady-state L-mode to a dithering mode and finally became an edge localized mode (ELM)-free H-mode. These three phases are separately characterized. Autopower spectra of density fluctuations measured in the dithering and ELM-free H-modes are limited to lower frequencies than those in the dithering and steady-state L-modes. Correlations between the density fluctuations, an Hα-signal and magnetic fluctuations as measured by Mirnov coils were analysed. The correlation calculations made for time windows of tens of milliseconds with time lag steps of 100 μs show that all the fluctuating quantities are highly correlated during the L-mode and dithering states, but that no correlation exists in the ELM-free H-mode. Evaluating correlations on a 20 μs timescale between magnetic and density fluctuations leads to the result that the minimum correlation timescale in steady-state and dithering L-modes is of order 100 μs, while no correlation exists for ELM-free and dithering H-modes. Finally, the time derivative of the phase of the measured complex density fluctuation signal allows us to study the structure of turbulent bursts in L- and H-mode.