A moiré pattern results from superimposing two black-and-white or greyscale patterns of regular geometry, such as two sets of evenly spaced lines. Here, we report the observation of an analogous effect with two transparent phase masks put in a light beam. The phase moiré effect and the classic moiré effect are shown to be the two ends of a continuous spectrum. The former allows the detection of sub-resolution intensity or phase patterns with a transparent screen. When applied to X-ray imaging, it enables the realization of a polychromatic far-field interferometer (PFI) without the need for absorption gratings. X-ray interferometry can non-invasively detect refractive index variations inside an object. Current bench-top interferometers operate in the near field with limitations in sensitivity and X-ray dose efficiency. The universal moiré effect helps overcome these limitations and obviates the need for using hard X-ray absorption gratings with sub-micrometre periods.