Aims. We analyse electron densities and filling factors of the diffuse ionized gas (DIG) in the Solar neighbourhood. Methods. We have combined dispersion measures and emission measures towards 38 pulsars at distances known to better than 50%, from which we derived the mean density in clouds, N c , and their volume filling factor, F v , averaged along the line of sight. The emission measures were corrected for absorption by dust and contributions from beyond the pulsar distance.Results. The scale height of the electron layer for our sample is 0.93±0.13 kpc and the midplane electron density is 0.023±0.004 cm −3 , in agreement with earlier results. The average density along the line of sight is n e = 0.018 ± 0.002 cm −3 and is nearly constant. Since n e = F v N c , an inverse relationship between F v and N c is expected. We find Conclusions. Our study of F v and N c of the DIG is the first one based on a sample of pulsars with known distances. We confirm the existence of a tight, nearly inverse correlation between F v and N c in the DIG. The exact form of this relation depends on the regions in the Galaxy probed by the pulsar sample. The inverse F v -N c relation is consistent with a hierarchical, fractal density distribution in the DIG caused by turbulence. The observed near constancy of n e then is a signature of fractal structure in the ionized medium, which is most pronounced outside the thin disk.