A computational homogenization method is presented in this article, for the investigation of localization phenomena arising in periodic masonry structures. The damage of the macroscopic, structural scale is represented by cohesive cracks, simulated by the extended finite element method. The cohesive traction–separation law along these cracks is built numerically, using a mesoscopic, fine scale, masonry model discretized by classical finite elements. It consists of stone blocks and the mortar joints, simulated by unilateral contact interfaces crossing the boundaries of the mesoscopic structure, assigned a tensile traction–separation softening law. The anisotropic damage induced by the mortar joints can be depicted by this method. In addition, the non-penetration condition between the stone blocks is incorporated in the averaging relations. Sophisticated damage patterns, depicted by several continuous macro-cracks in the masonry structure, can also be represented by the proposed approach. Finally, results are compared well with experimental investigation published in the literature.