Photonic crystals (PCs) are a field that is very important and interested in the design of a wide range of devices to control electromagnetic waves in different frequency regimes. Here, We try to introduce an all-optical device with practical applications such as fast response and high accuracy that have very critical and benchmark development in optical devices for photonic integrated circuits. In this paper, a novel modified shape 4-channel demultiplexer based on 2D-PCs by using suitable ring resonators is proposed to control light. The presented configuration includes three parts such as a direct input waveguide, a ring resonator, and four indirect waveguides for outputs of optical waves. Numerical analysis is investigated based on finite difference time domain (FDTD) method to achieve a four-band demultiplexer that has the capability to control the electromagnetic waves. Numerical results show that not only average quality factor (Q) of the 2D-PCs demultiplexer is 3969.25, but also average cross-talking value is -30.38 dB, the average transmission coefficient (T) is 0.998 and the lowest and highest channel bandwidths are 0.3 and 0.6 nm, respectively. Also, the minimum and maximum distance between any two adjacent channels is 0.6 and 1.1 nm. The all optical photonic demultiplexer has a compact footprint and occupies an area of 302 µm² and its operation is in long wavelength region. Based on the abovementioned practical performance and results, the presented optical demultiplexer is highly accurate by using a robust and low power-area that can be nominated to use photonic integrated circuits (PIC).