The precision measurement of the mass of the W boson is an important goal of the Fermilab Tevatron and the CERN Large Hadron Collider (LHC). It requires accurate theoretical calculations which incorporate both higher-order QCD and electroweak corrections, and also provide an interface to parton-shower Monte Carlo programs which make it possible to realistically simulate experimental data. In this paper, we present a combination of the full O(alpha) electroweak corrections of WGRAD2, and the next-to-leading order QCD radiative corrections to W -> l nu production in hadronic collisions in a single event generator based on the POWHEG framework, which is able to interface with the parton-shower Monte Carlo programs PYTHIA and HERWIG. Using this new combined QCD + EW Monte Carlo program for W production, we provide numerical results for total cross sections and kinematic distributions of relevance to the W mass measurement at the Tevatron and the LHC for the processes pp, p (p) over bar -> W-+/- -> mu(+/-)nu(mu). In particular, we discuss the impact of EW corrections in the presence of QCD effects when including detector resolution effects.