Traction force microscopy is extensively used to quantify the stresses exerted by adherent cells on elastic substrates, using as input the measured displacements of embedded marker beads and the cell contour. The analysis leads to a mathematical inverse problem, which is numerically ill-conditioned. It is widely recognized that the microbead image quality and cell segmentation uncertainties dramatically affect the inversion. However, the most current methods treat substrate displacements and segmented cell contours as ground truths and/or do not account for their regional variations. Such global regularization approaches cause systematic underestimation of true traction stresses and sub-optimal noise suppression. We present a new hierarchical Bayesian inference TFM (HiBi-TFM) method which incorporates local uncertainties in the images, automatized regularization parameter selection and physical constraints. HiBi-TFM uses the 3D elastostatic Green's function to deconvolve the measured displacements, and automatically assigns larger weights to regions with higher signal-to-noise ratio in the deconvolution residuals. The posterior space is further restricted by applying priors to enforce physical constraints (Balance of forces, moments, traction generation within cell area, etc.). The hierarchical nature of the inference allows for conditioning the priors on the segmentation quality of the cell contours. By choosing all the hyper-parameters from the image itself in this self-sufficient model, we infer the optimal, physically meaningful 3D traction field that faithfully reproduces the measured 3D displacements up to individual uncertainties. We tested HiBi-TFM on synthetic images for both microbeads (spatial heterogeneity, imaging artifacts, etc.) and cell contours (edge intensity gradients, etc.) and found that this hierarchical approach greatly improves previous methods. Of note, it increases spatial resolution and recovers biologically significant traction signatures in an unbiased manner, in the presence of noisy data.