Context : Three dimensional interstellar extinction maps provide a powerful tool for stellar population analysis . However , until now , these 3D maps were rather limited by sensitivity and spatial resolution . Aims : We use data from the VISTA Variables in the Via Lactea survey together with the Besançon stellar population synthesis model of the Galaxy to determine interstellar extinction as a function of distance in the Galactic bulge covering -10 ^ { \circ } < l < 10 ^ { \circ } and -10 ^ { \circ } < b < 5 ^ { \circ } . Methods : We adopted a recently developed method to calculate the colour excess . First we constructed the H–Ks vs. Ks and J–Ks vs. Ks colour-magnitude diagrams based on the VVV catalogues that matched 2MASS . Then , based on the temperature-colour relation for M giants and the distance-colour relations , we derived the extinction as a function of distance . The observed colours were shifted to match the intrinsic colours in the Besançon model as a function of distance iteratively . This created an extinction map with three dimensions : two spatial and one distance dimension along each line of sight towards the bulge . Results : We present a 3D extinction map that covers the whole VVV area with a resolution of 6′ \times 6′ for J–Ks and H–Ks using distance bins of 1 kpc . The high resolution and depth of the photometry allows us to derive extinction maps for a range of distances up to 10 kpc and up to 30 magnitudes of extinction in A _ { V } ( 3.0 mag in A _ { Ks } ) . Integrated maps show the same dust features and consistent values as other 2D maps . We discuss the spatial distribution of dust features in the line of sight , which suggests that there is much material in front of the Galactic bar , specifically between 5-7 kpc . We compare our dust extinction map with the high-resolution ^ { 12 } CO maps ( NANTEN2 ) towards the Galactic bulge , where we find a good correlation between ^ { 12 } CO and A _ { V } . We determine the X factor by combining the CO map and our dust extinction map . Our derived average value X= 2.5 \pm 0.47 \times 10 ^ { 20 } cm ^ { -2 } K ^ { -1 } km ^ { -1 } s is consistent with the canonical value of the Milky Way . The X-factor decreases with increasing extinction . Conclusions :