Euler spiral is a kind of fair curve which has linear curvature in terms of its arc length.In this paper, we propose an algorithm for approximating a segment of Euler spiral which interpolates two points and tangents at the points by a B-spline curve.The approximate B-spline curve is obtained as the solution to a differential equation which satisfies the boundary conditions.Similar to the exact Euler spiral, the desirable B-spline curve is also fair and has approximate linear curvature.Furthermore, an algorithm for fitting data points by the fair B-spline curves is also developed.