Several all-optical modulation format-converting schemes are described for non-return-to-zero (NRZ) and return-to-zero (RZ) modulation formats that make use of spectral filtering of either self-phase modulation (SPM) or cross-phase modulation (XPM) broadened signal spectrum in a highly-nonlinear dispersion-flattened photonic-crystal fibre. Format conversions have been performed between the most widely used modulation formats - NRZ and RZ. In addition, a hybrid clock recovery scheme is proposed to obtain the data rate of the NRZ signal for NRZ-to-RZ format conversion. All format-converting schemes are based on the extraction of the spectral components in a nonlinear phase modulation broadened signal spectrum. In NRZ-to-RZ format conversion, a periodic pulse train, at a repetition rate similar to the NRZ data rate, is used as a control that induces a nonlinear phase shift to the NRZ probe signal and broadens its spectrum. The spectral components, contributed by different time instances of the control pulse, can be extracted as the converted RZ signal output. In RZ-to-NRZ format conversion, the RZ signal serves as a control that induces a nonlinear phase shift to a continuous wave probe light, where a logic-inverted NRZ signal can be extracted by filtering out the chirped components. Format conversions between NRZ and RZ signals at 9.95328 GB/s (OC-192) are demonstrated. As the proposed optical signal-processing schemes make use of the fibre nonlinearity (SPM/XPM), it is possible to extend it to a high-speed operation <160 Gb/s. Therefore the proposed format-converting schemes can serve as a format converter between the optical time-division multiplexed networks and the wavelength division multiplexed networks