ABSTRACT We describe a general-purpose method to reconstruct the intrinsic properties of sources lensed by the gravitational potential of foreground clusters of galaxies. The tool lenstruction is implemented in the publicly available multipurpose gravitational lensing software lenstronomy, in order to provide an easy and fast solution to this common astrophysical problem. The tool is based on forward modelling the appearance of the source in the image plane, taking into account the distortion by lensing and the instrumental point spread function. For singly imaged sources, a global lens model in the format of the Hubble Frontier Fields (HFF) lensing maps is required as a starting point. For multiply imaged sources, the tool can also fit and apply first- (deflection), second- (shear, convergence), and third-order (flexion) corrections to the local gravitational potential to improve the reconstruction, depending on the quality of the data. We illustrate the performance and features of the code with two examples of multiply imaged systems taken from the HFF, starting from five different publicly available cluster models. We find that, after our correction, the relative magnification – and other lensing properties – between the multiple images becomes robustly constrained. Furthermore, we find that scatter between models of the reconstructed source size and magnitude is reduced. The code and Jupyter notebooks are publicly available.