We present a new method that allows to fabricate structures with tightly controlled three-dimensional profiles in the 10 nm to 100 μm scale range. This consists of a sequence of lithographic steps such as Electron Beam (EB) or Focused Ion Beam (FIB) lithography, alternated with isotropic wet etching processes performed on a quartz substrate. Morphological characterization by SEM and AFM shows that 3D structures with very accurate shape control and nanometer scale surface roughness can be realised. Quartz templates have been employed as complex system of micromirrors after metal coating of the patterned surface or used as stamps in nanoimprint, hot embossing or casting processes to shape complex plastic elements. Compared to other 3D micro and nanostructuring methods, in which a hard material is directly "sculptured" by energetic beams, our technique requires a much less intensive use of expensive lithographic equipments, for comparable volumes of structured material, resulting in dramatic increase of throughput. Refractive micro-optical elements have been fabricated and characterized in transmission and reflection modes with white and monochromatic light. The elements produce a distribution of sharp focal spots and lines in the three dimensional space, opening the route for applications of image reconstruction based on refractive optics.