A novel scheme of all-optical format conversion is proposed and simulated from non-return-to-zero (NRZ) to return-to-zero (RZ) at 40 Gbit/s by exploiting sum-frequency generation (SFG) in a periodically poled lithium niobate loop mirror (PPLN-LM). The conversion performance is analyzed, including eye diagrams, conversion efficiency, pulse width ratio, duty cycle, Q-factor, extinction ratio, and tunability. It is found that the signal wavelength can be tuned in a wide wavelength range by properly changing the pump wavelength.