Tanah Datar is a regency (kabupaten) in West Sumatra province, Indonesia. The regency has a population of 338,584 at the 2010 Census. The capital of the regency is Batusangkar. The town of Padang Panjang is also geographically located within the regency but constitutes a municipality (kota otonom) of its own.
Tanah Datar has several tourist attractions including the Pagaruyung Palace (Istano Pagaruyuang) with its museum, Sanskrit and Malay language stone inscriptions from the 14th century, several sites with megaliths (batu tagak), and the village Pandai Sikat (Pandai Sikek), where the traditional songket (kain balapak) is still woven. The northern part of Lake Singkarak is also situated in Tanah Datar.