Born in Medan, North Sumatra, Anwar studied at schools run by the Dutch colonial government until around 1940, when he and his mother moved to the capital, Batavia (now Jakarta).
Anwar lahir di Medan, Sumatera Utara, dan menempuh pendidikan di sekolah-sekolah yang dijalankan oleh pemerintahan kolonial Belanda sampai sekitar 1940, ketika ia dan ibunya pindah ke ibukota, Batavia (sekarang Jakarta).