High-resolution, conformable phase masks provide a means to fabricate, in an experimentally simple manner, classes of 3D nanostructures that are technologically important but difficult to generate in other ways. In this approach, light passing through a phase mask that has features of relief comparable in dimension to the wavelength generates a 3D distribution of intensity that exposes a photopolymer film throughout its thickness. Developing this polymer yields a structure in the geometry of the intensity distribution, with feature sizes as small as 50 nm. Rigorous coupled-wave analysis reveals the fundamental aspects of the optics associated with this method; a broad-range 3D nanostructures patterned with it demonstrates its technical capabilities. A nanoporous filter element built inside a microfluidic channel represents one example of the many types of functional devices that can be constructed.