We propose a novel two-dimensional photonic crystal structure consisting of two line defect waveguides and a cavity to realize mode conversion based on the coupling effect. The W1/cavity/W2 structure breaks the spatial symmetry and successfully converts the even (odd) mode to the odd (even) mode in the W2 waveguide during the forward (backward) transmission. When considering the incidence of only the even mode, the optical diode effect emerges and achieves approximate 35 dB unidirectionality at the resonant frequency. Moreover, owing to the narrow bandpass feature and the flexibility of the tuning cavity, utilization of the proposed structure as a wavelength filter is demonstrated in a device with a Y-branch splitter. Here, we provide a heuristic design for a mode converter, optical diode, and wavelength filter derived from the coupling effect between a cavity and adjacent waveguides, and expect that the proposed structure can be applied as a building block in future all-optical integrated circuits.