Gravitational waves can constitute a unique probe of the universe. In many cases of sources operating in the early universe, the characteristic frequency of the emitted GW is directly related to the energy scale at which the GW source acts. Consequently, different GW detectors can probe different energy scales in the evolution of the universe, going much beyond the recombination scale accessible through the CMB. Moreover, compact binaries emitting GW can be used as standard sirens, to probe the energy content of the late universe and test dark energy. After a general introduction to the subject, this seminar presents various aspects of using GW to probe cosmology, and discusses detection prospects.