We analyze the Talbot effect produced by a mask composed of two diffraction gratings. Combinations with phase and amplitude gratings have been studied in the near-field regime. For a two-phase-gratings configuration, the Talbot effect is canceled, even when using monochromatic light; that is, the intensity distribution is nearly independent of the distance from the mask to the observation plane. Therefore, the mechanical tolerances of devices that use the Talbot effect may be improved. In addition, the spatial frequency of the fringes is quadrupled, which improves the accuracy of devices that employ this mask. An experimental verification for the best case two phase gratings, has also been performed, validating the theoretical results.