This presentation is codncerned with the development of phase gratings for use at Terahertz frequencies (sub-mm wavelengths). Design, fabrication and testing of two grating types (Dammann and Fourier) are discussed. Modelling using quasi-optical techniques is outlined and the implementation of a suitable algorithm (Gerchberg-Saxton) to find solutions for the phase-retrieval problem discussed.