Cosmological data still allow for the presence of a non-negligible amount of dark energy at very high redshifts, namely during the matter- and radiation-dominated epochs. This is the so-called early dark energy (EDE), which could help to mitigate the tensions that affect the standard model of cosmology since (i) it reduces the sound horizon at the baryon-drag epoch, hence giving room to higher values of H0 than those found in the ΛCDM; and (ii) it could potentially decrease the number of large-scale structures in the Universe due its negative pressure and its inability to cluster efficiently for large enough values of its sound speed. Here we put constraints on the fraction of EDE using two methods: first, we use a perfect fluid parameterization that produces plateaux in Ωede(z) during the relativistic and non-relativistic matter-dominated eras. Second, we apply a tomographic approach to constrain the EDE density in redshift bins, which allows us to reconstruct the evolution of the EDE fraction before and after the decoupling of the Cosmic Microwave Background (CMB) photons. We have employed Planck data 2018, the Pantheon compilation of supernovae of Type Ia (SNIa), data on galaxy clustering, the prior on the absolute magnitude of SNIa by SH0ES, and weak lensing data from KiDS+VIKING-450 and DES-Y1. Using our minimal parameterization we find that EDE is not able to loosen the cosmological tensions, and show that the constraints on the EDE fraction weaken considerably when its sound speed takes lower values. Thanks to our binned analysis we are able to put tight constraints on the EDE fraction around the CMB decoupling time, ≲ 0.4% at 2σ c.l. We confirm previous results that a significant EDE fraction in the radiation-dominated epoch loosens the H0 tension, but tends to worsen the tension for σ8. A subsequent presence of EDE in the matter-dominated era helps to alleviate this problem. When both the SH0ES prior and weak lensing data are considered in the fitting analysis in combination with data from CMB, SNIa and baryon acoustic oscillations, the EDE fractions are constrained to be ≲ 2.6% in the radiation-dominated epoch and ≲ 1.5% in the redshift range z ∈ (100, 1000) at 2σ c.l. The two tensions remain with a statistical significance of ∽ 2 − 3σ c.l. This contribution to the proceedings of the CM3 parallel session of the MG16 Marcel Grossmann virtual Conference: “Status of the H0 and σ8 tensions: theoretical models and model-independent constraints” is based on the paper arXiv:2107.11065, which appeared in the arXiv shortly after my talk of July 6th 2021.