We propose an efficient method to reinitialize a level set function to a signed distance function by solving an elliptic problem using the finite element method. The original zero level set interface is preserved by means of applying modified boundary conditions to a surrogate/approximate interface weakly with a penalty method. Narrow band technique is adopted to reinforce the robustness of the proposed method where a smooth initial guess for the nonlinear equation is given by solving a Laplace’s equation. Numerical benchmarks in both two dimensions and three dimensions confirm the optimal convergence rates under several different error measures including an interface error measure, showing that our method is accurate and robust. A three-dimensional genus 2 surface is adopted to demonstrate the capability of the method for the reinitialization of complicated geometries.