Fast tool servo is one of the key components in manufacturing complex surfaces with nanometer-scale resolution. This paper presents the controller design for an electromagnetically driven fast tool servo. First, the nonlinear and frequency-dependent actuator is linearized with dynamic nonlinear compensation method. Next, the plant is compensated with lead-lag controller plus integrator to achieve the cross over frequency at one twentieth of the sampling frequency. Finally, repetitive controller is plugged into the compensated loop of the last step to improve the tracking of spindle synchronized trajectory and the rejection of spindle rotation induced disturbance. Based on the integrator gain of the compensated loop, a method of tuning repetitive controller gains is presented to ensure the closed loop system phase margin in spite of changes of repetitive controller poles. Experiment is conducted on a diamond turning machine. For 100 kHz sampling frequency, the achieved closed loop bandwidth is 10 kHz with -3 dB attenuation. The maximum stroke is 50 /spl mu/m for up to 1 kHz operation and the maximum acceleration is 160 g up to 3 kHz. An aluminum part is turned with sinusoidal surface to demonstrate the usability of the control.