We propose and numerically validate an all‐optical scheme to generate a train of optical pulses. Modulation of a continuous wave with a periodic binary temporal phase pattern followed by a spectral phase shaping enables us to obtain ultrashort pulse trains. An ideal step phase profile as well as a profile arisen from a bandwidth‐limited device is investigated. Analytical guidelines describing pulse train formation and their characteristics are provided. Pulses with a duration of a few picoseconds at a repetition rate of 10 GHz can be expected for realistic experimental conditions.