We report an experimental investigation of the 6S–8S transition of cesium atoms by using Doppler-free two-color spectroscopy. We consider the case in which one of the laser frequencies is nearly resonant with the 6S1/2–6P3/2 transition while a second one is swept around the 6P3/2–8S1/2 transition. The lineshapes of two-photon absorption spectra are analyzed taking into account the effects of saturation and collisions. Both counterpropagating and copropagating laser-beam schemes are studied. Although for the linewidths are broader copropagating beams, such a scheme has proved advantageous to fully resolve the hyperfine structure of the final state 8S1/2 and, hence, to measure the dipole magnetic constantA of this state.