White dwarfs are the burnt-out cores of Sun-like stars and are the fate of 97 per cent of the stars in our Galaxy. The internal structure and composition of white dwarfs are hidden by their high gravities, which causes all elements apart from the lightest ones to settle out of their atmospheres. The most direct method of probing the inner structure of stars and white dwarfs in detail is via asteroseismology. Here we present a pulsating white dwarf in an eclipsing binary system, enabling us to place extremely precise constraints on the mass and radius of the white dwarf from the lightcurve, independent of the pulsations. This 0.325-solar-mass white dwarf—one member of the SDSS J115219.99+024814.4 system—will serve as a powerful benchmark with which to constrain empirically the core composition of low-mass stellar remnants and to investigate the effects of close binary evolution on the internal structure of white dwarfs.