We developed a simple process to fabricate deeply buried micro- and nanoscale channels in glass and porous silicon from bulk silicon using a combination of ion beam irradiation, electrochemical anodization and high temperature oxidation. The depth, width and length of these structures can be controllably varied and we successfully fabricated an array of centimeter-long buried micro- and nanochannels. This process allows densely packed, arbitrary-shaped channel geometries with micro- to nanoscale dimensions to be produced in a three-dimensional multilevel architecture, providing a route to fabricate complex devices for use in nanofluidics and lab-on-a-chip systems. We demonstrate the integration of these channels with large reservoirs for DNA linearization in high aspect ratio nanochannels.