The energy performance of a building has a significant impact on the environment as well as the comfort of its occupants. Given that window systems and control elements such as shading devices play a critical role in a building's energy consumption and comfort, this article presents an investigation into the optimization of windows in four different orientations, along the four cardinal directions, for a typical office room in Tehran. The objective is to reduce cooling, heating, and lighting energy consumption while improving occupant comfort simultaneously, using the NSGA‐II algorithm as a multi‐objective optimization method. To this end, first, an investigation into the effects of various parameters on total building energy consumption and occupant comfort is conducted. Subsequently, each parameter is evaluated in detail concerning its impact on each façade. As the final step, for each façade, the optimal solutions and the most undesirable scenarios are determined. The results, in which the possibility of glare is also considered, can be used by architects and designers for making informed design decisions. The results show that, in all orientations, the number of slats and their distance from the wall are the most effective parameters of shading configurations. Although the eastern and western windows are larger in this study, visual discomfort can be controlled using suitable shadings to achieve acceptable levels of visual comfort. Furthermore, north façades provide the least amount of thermal comfort and consume the least amount of energy while experiencing glare for longer periods.