The polarizations of the Υ(1S), Υ(2S) and Υ(3S) mesons produced in proton-proton collisions at s​=7TeV are measured using a data sample collected with the CMS detector in 2011. The data correspond to an integrated luminosity of 4.9fb−1. The measurements are based on the analysis of the dimuon decay angular distributions, analyzed in three different polarization frames, and are presented as a function of the Υ transverse momentum in two rapidity ranges. The measurement of the polarization parameters, λθ​,λϕ​ and λθϕ​, is complemented by the determination of the frame-invariant quantity λ~, which provides a useful intrinsic test of the reliability of the whole analysis chain as well as supplementary physical information. The polarization of the three Υ states are found to be small in the considered kinematic region (10<pT​<50~GeV, ∣y∣<1.2) in all the polarization frames