We discuss the action of O(d,d), and in particular T-duality, in the context of generalized geometry, focusing on the description of so-called non-geometric backgrounds. We derive local expressions for the pure spinors descibing the generalized geometry dual to an SU(3) structure background, and show that the equations for N=1 vacua are invariant under T-duality. We also propose a local generalized geometrical definition of the charges f, H, Q and R appearing in effective four-dimensional theories, using the Courant bracket. We then address certain global aspects, in particular whether the local non-geometric charges can be gauged away in, for instance, backgrounds admitting a torus action, as well as the structure of generalized parallelizable backgrounds.