Traditionally, the spatial filtering (or beamforming) of towed array data proceeds on the assumption that the horizontal array is always straight. However, if the geometric configuration of the hydrophones adopts a nonlinear shape so that the hydrophone positions are no longer collinear, the acoustic performance of the sonar system degrades. Using real towed array data acquired during a sea experiment, this paper shows the effects of both small perturbations and large deformations to the array's shape on both conventional and adaptive beamformers for two frequencies: The lower frequency is approximately equal to the spatial Nyquist frequency (or design frequency) of the array, while the higher frequency is about three times greater. Large shape deformations lead to a decrease in the conventional beamformer's output power for a beam steered in the direction of the signal source, together with an increase in the sidelobe levels (or secondary maxima), while small perturbations in the array shape have little effect. Signal suppression is observed to be far greater for the adaptive beamformer because it is much more sensitive (than the more robust conventional beamformer) to system errors, which arise in the present case from imperfect knowledge of the hydrophone positions. The imposition of a weight norm constraint on the adaptive beamformer reduces the signal suppression only for small shape perturbations, while array shape estimation techniques need to be invoked to reduce signal suppression for large shape deformations. The adverse effects of a nonlinear array shape on both conventional and adaptive beamforming are shown to be substantially reduced by applying techniques that estimate the coordinates of the hydrophones prior to beamforming. The two array shape estimation techniques considered here require an acoustic source to be present in the far field and use only the acoustic data from the hydrophones themselves to estimate their positions. These techniques do not require data from non-acoustic sensors such as heading and depth sensors distributed along the length of the array to estimate its shape.