The inverse problem of determining an unknown source term depending on space variable in a parabolic equation is considered. A numerical algorithm is presented for recovering the unknown function and obtaining a solution of the problem. As this inverse problem is ill-posed, Tikhonov regularization is used for finding a stable solution. For solving the direct problem, a Galerkin method with the Sinc basis functions in both the space and time domains is presented. This approximate solution displays an exponential convergence rate and is valid on the infinite time interval. Finally, some examples are presented to illustrate the ability and efficiency of this numerical method.with the initial condition u(x, 0) = u 0 (x), 0 < x < 1, and the boundary conditions u(0, t) = ψ(t), u(1, t) = ϕ(t), t > 0,