We consider finite difference approximations of solutions of inverse Sturm-Liouville problems in bounded intervals. Using three-point finite difference schemes, we discretize the equations on so-called optimal grids constructed as follows: For a staggered grid with 2k points, we ask that the finite difference operator (a k × k Jacobi matrix) and the Sturm-Liouville differential operator share the k lowest eigenvalues and the values of the orthonormal eigenfunctions at one end of the interval. This requirement determines uniquely the entries in the Jacobi matrix, which are grid cell averages of the coefficients in the continuum problem. If these coefficients are known, we can find the grid, which we call optimal because it gives, by design, a finite difference operator with a prescribed spectral measure. We focus attention on the inverse problem, where neither the coefficients nor the grid are known.A key question in inversion is how to parametrize the coefficients, i.e., how to choose the grid. It is clear that, to be successful, this grid must be close to the optimal one, which is unknown. Fortunately, as we show here, the grid dependence on the unknown coefficients is weak, so the inversion can be done on a precomputed grid for an a priori guess of the unknown coefficients. This observation leads to a simple yet efficient inversion algorithm, which gives coefficients that converge pointwise to the true solution as the number k of data points tends to infinity. The cornerstone of our convergence proof is showing that optimal grids provide an implicit, natural regularization of the inverse problem, by giving reconstructions with uniformly bounded total variation. The analysis is based on a novel, explicit perturbation analysis of Lanczos recursions and on a discrete Gel fand-Levitan formulation.