Most baseline errors of analog strong-motion data still exist in highresolution data. In this study, we identify the major baseline errors of digital strong-motion data and propose a three-step algorithm to correct these errors. The major baseline errors found in these digital data consist of constant drift in the acceleration, low-frequency instrument noise, low-frequency background noise, the small initial values for acceleration and velocity, and manipulation errors. This threestep algorithm includes fitting the baseline of acceleration by the least squares, applying a high-pass filter in acceleration, and subtracting the initial values in velocity. A least-squares fit of a straight line before filtering can effectively remove the baseline drift in acceleration. Then, the filtering removes the linear trend and other low-frequency errors that exist in the acceleration. Finally, the subtracting of the initial velocity removes the linear trend of displacement. Among these three steps, only the filtering in the second step may introduce a side effect. Compared to the Volume II routine developed by Trifunac and Lee (1973), this three-step processing significantly reduces computational efforts and side effects resulting from unnecessary manipulation of data. This algorithm has been successfully tested on several types of digital strong-motion data. Several independent validations show that the proposed algorithm is stable.