In this paper, we used the novel defective resonant cavities to design an eight-channel photonic crystal demultiplexer. We showed that by choosing appropriate values for the width of the resonant cavity, the desired wavelengths can be separated. The proposed platform has a square lattice of dielectric rods immersed in air. The value of transmission efficiency for channels was obtained in 94−99 % range. In addition, the maximum value of crosstalk and average quality factor for channels were calculated -11.2 dB and 2200, respectively.