We construct a family of type IIB string backgrounds that are deformations of AdS 3 × S 3 × T 4 with a "squashed" AdS 3 × S 3 metric supported by a combination of NSNS and RR fluxes. They have global SU(1, 1) × SU(2) symmetry, regular curvature, constant dilaton and preserve 8 supercharges. Upon compactification to 4 dimensions they reduce to N = 2 supersymmetric AdS 2 × S 2 solutions with electric and magnetic Maxwell fluxes. These type IIB supergravity solutions can be found from the undeformed AdS 3 ×S 3 ×T 4 background by a combination of T-dualities and S-duality. In contrast to T-duality, S-duality transformations of a type IIB supergravity background do not generally preserve the classical integrability of the corresponding Green-Schwarz superstring sigma model. Nevertheless, we show that integrability is preserved in the present case. Indeed, we find that these backgrounds can be obtained, up to T-dualities, from an integrable inhomogeneous Yang-Baxter deformation (with unimodular Drinfel'd-Jimbo R-matrix) of the original AdS 3 × S 3 supercoset model.