An advanced lithographic technique which is based on direct writing of thin films by hard X-rays has been developed. Silica hybrid organic–inorganic films have been deposited by radio frequency plasma-enhanced chemical vapour deposition and have been patterned using deep X-ray lithography with synchrotron light. The exposure to high energy photons removed the organic groups in the films and induced densification of the silica network. The films, after lithographic writing, can be easily chemically etched to obtain well-defined patterns of high quality. By tuning the exposure dose it is possible modulating the structure and the properties of the final material. The overall lithography process can be achieved in two steps, writing by X-rays and chemical etching, therefore employing the hybrid film directly as resist without employing any other intermediate step. The films and the patterned structures have been characterized by ellipsometric spectroscopy, scanning electron microscopy, atomic force microscopy, contact angle measurements, Fourier transform infrared spectroscopy, infrared imaging and Rutherford backscattering.