We study the decays of the J/psi and psi mesons to pi+pi-pi0 using data samples at both resonances collected with the BES III detector in 2009. We measure the corresponding branching fractions with unprecedented precision and provide mass spectra and Dalitz plots. The branching fraction for J/psi -> pi+pi-pi0 is determined to be (2.137 +- 0.004 (stat.) +0.058-0.056 (syst.) +0.027-0.026 (norm.))*10-2, and the branching fraction for psi -> pi+pi-pi0 is measured as (2.14 +- 0.03 (stat.) +0.08-0.07 (syst.) +0.09-0.08 (norm.))*10-4. The J/psi decay is found to be dominated by an intermediate rho(770) state, whereas the psi decay is dominated by di-pion masses around 2.2 GeV/c2, leading to strikingly different Dalitz distributions.