The purpose of the present work is to investigate humidification–dehumidification desalination system and to explore the effect of pertinent parameters on the overall performance of the process taking in account the irreversibilities and energy losses. The system has been inspected using first and second laws of thermodynamics, and an optimization of the performance along with design development has been performed based on mathematical calculation and modeling for the fundamental equations associated with mass, energy, exergy and salinity balance incorporating the effects of irreversibilities and thermal losses which in turn helps in establishing an efficient desalination system by reducing these losses. The results show a good improvement compared to previous studies. The model target is to increase heat exchange in humidifier and dehumidifier compartment as well as augmenting pure water capacity and lessening energy consumption. Results expose that the inlet water temperature and flow rate represent the main factors affecting the system performance. It is found that the heater has the main part of exergy losses. Increasing the temperature of the water in the dehumidifier
outlet allows minimizing the exergy losses in the dehumidifier.