We introduce universal diffractive waveguide designs that can match the performance of conventional dielectric waveguides and achieve various functionalities. Optimized using deep learning, diffractive waveguides can be cascaded to form any desired length and are comprised of transmissive diffractive surfaces that permit the propagation of desired modes with low loss and high mode purity. In addition to guiding the targeted modes through cascaded diffractive units, we also developed various waveguide components and introduced bent diffractive waveguides, rotating the direction of mode propagation, as well as spatial and spectral mode filtering and mode splitting diffractive waveguide designs, and mode-specific polarization control. This framework was experimentally validated in the terahertz spectrum to selectively pass certain spatial modes while rejecting others. Without the need for material dispersion engineering diffractive waveguides can be scaled to operate at different wavelengths, including visible and infrared spectrum, covering potential applications in, e.g., telecommunications, imaging, sensing and spectroscopy.