A novel all-optical header and payload separation technique that can be utilized in unslotted optical packet switched networks is presented. The technique uses a modified terahertz optical asymmetric demultiplexer (TOAD) for packet header extraction with differential modulation scheme, and two semiconductor optical amplifiers (SOAs) that perform a simple XOR operation between the packet and its self-derived header to get the separated payload. The main virtue of this system is its simple structure and that it does not need any additional continuous pulses. Through numerical simulations, the operating characteristics of the scheme are illustrated. In addition, the parameters of the system are discussed and designed to optimize the operation performance.