A finite element code is described that solves the plasma time-dependent diffusion equations in arbitrary toroidal geometry. For space discretization, linear rectangular elements are used with mapping techniques when the cross section is not circular. The time discretization is achieved by the three-step Crank-Nicolson extrapolation method. Numerical results are exhibited with several linear and nonlinear diffusion models.