In this paper a general theory for interpolation methods on a rectangular grid is introduced. By the use of this theory an efficient B-spline based interpolation method for spectral codes is presented. The theory links the order of the interpolation method with its spectral properties. In this way many properties like order of continuity, order of convergence and magnitude of errors can be explained. Furthermore, a fast implementation of the interpolation methods is given. We show that the B-spline based interpolation method has several advantages compared to other methods. First, the order of continuity of the interpolated field is higher than for other methods. Second, only one FFT is needed whereas e.g. Hermite interpolation needs multiple FFTs for computing the derivatives. Third, the interpolation error almost matches the one of Hermite interpolation, a property not reached by other methods investigated.