Context. The next generation of space-borne instruments dedicated to the direct detection of exoplanets requires unprecedented levels of wavefront control precision. Coronagraphic wavefront sensing techniques for these instruments must measure both the phase and amplitude of the optical aberrations using the scientific camera as a wavefront sensor. Aims. In this paper, we develop an extension of coronagraphic phase diversity to the estimation of the complex electric field, that is, the joint estimation of phase and amplitude. Methods. We introduced the formalism for complex coronagraphic phase diversity. We have demonstrated experimentally on the Tr`es Haute Dynamique testbed at the Observatoire de Paris that it is possible to reconstruct phase and amplitude aberrations with a subnanometric precision using coronagraphic phase diversity. Finally, we have performed the first comparison between the complex wavefront estimated using coronagraphic phase diversity (which relies on time-modulation of the speckle pattern) and the one reconstructed by the self-coherent camera (which relies on the spatial modulation of the speckle pattern). Results. We demonstrate that coronagraphic phase diversity retrieves complex wavefront with subnanometric precision with a good agreement with the reconstruction performed using the self-coherent camera. Conclusions. This result paves the way to coronagraphic phase diversity as a coronagraphic wave-front sensor candidate for very high contrast space missions.