Grating based X-ray phase contrast imaging sets out to overcome the limits of conventional X-ray imaging in the detection of subtle density differences and opens a way to characterize a sample's microstructure without the need for ultrahigh spatial resolution. The technique relies on grating structures with micrometric periods and extreme aspect ratio - their fabrication by X-ray lithography with optimal structure quality is the topic of this work.