X-ray gratings have been developed for use in the wavelength region of 0.01-20 nm, where it is required to employ a grazing incidence configuration. The gratings have a rectangular profile and radiation is diffracted both from the tops and bottoms of the grooves. They therefore differ from blazed gratings, used at grazing incidence, in that a substantial portion of the grating participates in the diffraction process. A scalar diffraction theory has been developed which demonstrates that grating diffraction efficiency varies periodically with wavelength, pitch, groove depth and incidence angle. The theory can be used to optimize grating parameters for most efficient use in any selected region of the spectrum. The gratings are produced by processing a ruled 300 lines per millimetre master grating, so that surface profile defects introduced by ruling are eliminated. Grating performance has been assessed by means of a specially designed grating analyser in addition to spectrometers and a spectrograph. The experimental results are in qualitative agreement with theory. At very short wavelengths of 0.05 nm and grazing incidence angles of about 5$\prime $, the diffraction efficiency in the first order is below 1%. The efficiency rises rapidly to between 5 and 10% at 0.15 nm and to 20% in the 1 nm region where the incidence angles are typically a few degrees.