The radial distribution of the beam-induced charge in thin films is investigated using the contrast transfer properties of the transmission electron microscope. The phase shift due to charging is measured as the phase difference between the contrast transfer functions of two photos taken with and without film at the back focal plane. Solving the inverse Laplace problem with this input data recovers the charge density of the measured film. The electric potential function in the whole area is reconstructed using the boundary integral method and the analytical solution of the Laplace equation for the electric potential is induced from unit step-wise surface charge. The phase shift of electron waves is derived in a weak lens approximation. In this way, the radial dependence of the charge density and the magnitude of the electrostatic potential at the thin film are obtained. The surface charge density reaches quasi-equilibrium state after the first 30 min of the electron beam pre-irradiation. The hydrocarbon contamination layer on the surface of the film is considered to be the main source of charging. An explanation of the qualitative behavior of the charge density, based on the contamination diffusion theory, is proposed.