The exclusive electroproduction of two pions in the mass range 0.4 < M-pi pi < 2.5 GeV has been studied with the ZEUS detector at HERA using an integrated luminosity of 82 pb(-1). The analysis was carried out in the kine-matic range of 2 < Q(2) < 80 GeV2, 32 < W < 180 GeV and vertical bar t vertical bar < 0.6 GeV2, where Q(2) is the photon virtuality, W is the photon-proton centre-of-mass energy and t is the squared four-momentum transfer at the proton vertex. The two-pion invariant-mass distribution is interpreted in terms of the pion electromagnetic form factor, vertical bar F(M-pi pi)vertical bar, assuming that the studied mass range includes the contributions of the rho, rho' and rho `' vector-meson states. The masses and widths of the resonances were obtained and the Q(2) dependence of the cross-section ratios sigma(rho ` -> pi pi)/sigma(rho) and sigma (rho `' -> pi pi)/sigma(rho) was extracted. The pion form factor obtained in the present analysis is compared to that obtained in e(+) e(-) -> pi(+) pi(-).