In this paper, a tunable optical switch/demultiplexer has been presented based on nonlinear multimode interference waveguides. The proposed structure can be utilized as a multi-wavelength optical switch or dynamic wavelength division demultiplexer. This dual application of the structure has been designed based on the cooperation of self-imaging and self-guiding phenomena of multimode waveguides. Simulation results show the mean value of insertion loss equal to −1.91 dB for the switching application of structure. Also, the wavelengths with 3 nm channel spacing and almost 3 nm full width at half power of outputs can be received in the multiplexing application. Two-dimensional beam propagation method has been utilized in order to simulate and verify the performance of proposed device.