In the past few years, the level set method has been extensively used for the numerical solution of interface problems in different domains, from free-surface and mean curvature flows to image processing. A crucial ingredient in every implementation of the level set method is the so-called \textit{reinitialization} procedure, which consists in periodically replacing the level set function with the signed distance function from the current interface position. In this paper, we review the role of the reinitialization step in the level set method and we propose a new technique that can be adopted on unstructured grids. This technique is based on local reconstruction of the level set function around the interface, where the best (in the $L^2$-sense) continuous piecewise linear approximation of the signed distance function can be explicitely computed. The convergence properties of the method are analysed theoretically and numerical tests and comparisons with standard reinitialization procedures are presented and discussed.