A systematic approach to synthesize the flat-topped beam (FTB) with arbitrary beam directions for uniform linear arrays (ULAs) is proposed, illustrated, and demonstrated. Based on the correspondence between the far-field pattern of ULAs and the response function of finite impulse response (FIR) filters, both the broadside and end-fire FTBs can be synthesized using window method, whereas the oblique FTB synthesis is failed due to the appearance of grating lobes. A mathematical analyzation indicates that two grating lobes are conjugate to each other. Thus, a linear phase method (LPM) is proposed to apply progressive excitation phases to each individual array element, which can eliminate the grating lobes by manipulating the two conjugate beams to overlap with each other. The proposed LPM is generalized to the synthesis of broadside, oblique and unidirectional end-fire FTBs, and the corresponding inter-element spacing constraints are addressed. The proposed approach is experimentally verified using a 16-element substrate-integrated waveguide slot antenna array. Comparing with the conventional Fourier series method and Woodward-Lawson method, the proposed approach has advantages of both smaller ripples in the main beam and controllable side-lobe levels. The proposed approach is promising for offering efficient beamforming functionalities for wireless communications, imaging, and radar applications.INDEX TERMS Beamforming, flat-topped beam, spacing constraint, uniform linear array.