This work is concerned with the numerical computation of null controls for the heat equation. The goal is to compute an approximation of controls that drives the solution from a prescribed initial state at t=0 to zero at t=T. In spite of the diffusion of the heat equation, recent developments indicate that this issue is difficult and still largely open. Most of the existing literature, concerned with controls of minimal L2-norm, make use of dual convex arguments and introduce backward adjoint system. In practice, the null control problem is then reduced to the minimization of a dual conjugate function with respect to the final condition of the adjoint state. As a consequence of the highly regularizing property of the heat kernel, this final condition – which may be seen as the Lagrange multiplier for the null controllability condition – does not belong to L2, but to a much larger space than can hardly be approximated by finite (discrete) dimensional basis. This phenomenon, unavoidable whatever be the numerical approximation used, strongly deteriorates the efficiency of minimization algorithms. In this work, we do not use duality arguments and in particular do not introduce any backward heat equation. For the boundary case, the approach consists first in introducing a class of functions satisfying a priori the boundary conditions in space and time, in particular the null controllability condition at time T, and then finding among this class one element satisfying the heat equation. This second step is done by minimizing a convex functional among the admissible corrector functions of the heat equation. The inner case is performed in a similar way. We present the (variational) approach, discuss the main features of it and then describe some numerical experiments highlighting the interest of the method. The method holds in any dimension but, for the sake of simplicity, we provide details in the one-space dimensional case.