We present a method to recover mass profiles of galaxy clusters by combining data on the thermal Sunyaev-Zeldovich (tSZ) and X-ray imaging, thereby avoiding the use of any information on X-ray spectroscopy. This method, which represents the development of the geometrical deprojection technique presented in a previous paper by Ameglio et al., implements the solution of the hydrostatic equilibrium equation. In order to quantify the efficiency of our mass reconstructions, we apply our technique to a set of hydrodynamical simulations of galaxy clusters. We propose two versions of our method of mass reconstruction. Method 1 is completely modelindependent and assumes the values of gas density and total mass within different radial bins as fitting parameters. Method 2 assumes instead the analytic mass profile proposed by Navarro, Frenk & White (NFW). We find that the main source of bias in recovering the mass profiles is due to deviations from hydrostatic equilibrium, which cause an underestimation of the mass of about 10 per cent at r 500 and up to 20 per cent at the virial radius. Method 1 provides a reconstructed mass which is biased low by about 10 per cent, with a 20 per cent scatter, with respect to the true mass profiles. Method 2 proves to be more stable, reducing the scatter to 10 per cent, but with a larger bias of 20 per cent, mainly induced by the deviations from equilibrium in the outskirts. To better understand the results of Method 2, we check how well it allows us to recover the relation between mass and concentration parameter. When analysing the three-dimensional mass profiles, we find that including in the fit the inner 5 per cent of the virial radius biases high the halo concentration, thus suggesting that the NFW profile is not a perfect fit in the central regions of our simulations including cooling and star formation. Also, at a fixed mass, hotter clusters tend to have larger concentration. Our procedure recovers the concentration parameter essentially unbiased but with a scatter of about 50 per cent. In general, our analysis demonstrates that combining X-ray imaging with spatially resolved tSZ data is a valid alternative to using X-ray spectroscopy to recover the mass of galaxy clusters.