Taipei, officially known as Taipei City, is the capital and a special municipality of Taiwan. It is situated in Northern Taiwan as an enclave within the municipality of New Taipei City. The city is located approximately 25 kilometres southwest of the northern port city of Keelung.
The majority of the city is positioned on the Taipei Basin, which is characterized as an ancient lakebed. This basin is bordered by the narrow valleys of the Keelung and Xindian rivers, which converge to form the Tamsui River along the western boundary of the city.