The Great Wall is not located in a single city. It stretches across northern China, winding through Beijing, Tianjin, Hebei, Shanxi, Inner Mongolia, Shaanxi, Gansu, Ningxia, Qinghai, and Xinjiang. Different sections were built by various dynasties over centuries to defend against northern invasions.
Popular tourist sections near Beijing (Badaling, Mutianyu, Jinshanling) are the most visited, but the wall’s total length exceeds 21,000 km (13,000 mi), crossing deserts, mountains, and grasslands.