Abstract. In this paper, optimal design and assessment of the capability of Tuned Mass Dampers (TMDs) in improving the seismic behavior of con ned masonry walls, as the main element of historical buildings, has been studied. For this purpose, the design parameters of TMDs have been determined through minimization of wall response using Genetic Algorithms (GAs). To simulate the behavior of con ned masonry wall under earthquake, the triple linear shear beam model has been used. For illustration, the method has been tested on con ned masonry walls equipped with linear TMDs. To study the e ects of frequency content and Peak Ground Acceleration (PGA) of earthquake records on the performance of TMDs, the controlled walls have been subjected to di erent earthquake records. Results show that the proposed method has been e ective in designing optimal TMDs regarding the convergence and simplicity of GA in solving the optimization problem. It has also been shown that using TMD enhances the seismic behavior of con ned masonry walls, which its e ciency depends on the earthquake characteristics and the mass ratio. Finally, it can be concluded that the results of this research could be used as guides to design TMDs for historical and heritage buildings.