Abstract A challenge in optical phased arrays (OPAs) is to achieve single-lobe emission using densely spaced emitters without incurring inter-waveguide optical crosstalk. Here, we propose to heuristically optimize the amplitude and phase of each grating antenna in an OPA to correct for optical non-idealities, including fabrication variations and inter-waveguide crosstalk. This method was applied to a silicon photonic integrated circuit with 1 mm-long gratings at 775 nm spacing for operation in a wavelength range of 1450–1650 nm. We achieved a wide two-dimensional beam-steering range of 110° × 28°, evaluated over a 127° × 47° field-of-view (FOV). Within this FOV, we measured an average sidelobe suppression of 8.2 dB and focused on average, 34.5 % of the emitted power into the main lobe. We achieved a peak sidelobe suppression of 14.5 dB and 50 % of the power concentrated in the main lobe. The approach is suitable for applications that require alias-free out-of-plane emission.