Sanskrit (; stem form ; nominal singular , ,) is a classical language belonging to the Indo-Aryan branch of the Indo-European languages. Sanskrit is the sacred language of Hinduism, the language of classical Hindu philosophy, and of historical texts of Buddhism and Jainism. It was a link language in ancient and medieval South Asia, and upon transmission of Hindu and Buddhist culture to Southeast Asia, East Asia and Central Asia in the early medieval era, it became a language of religion and high culture, and of the political elites in some of these regions. As a result, Sanskrit had a lasting effect on the languages of South Asia, Southeast Asia and East Asia, especially in their formal and learned vocabularies.

Sanskrit generally connotes several Old Indo-Aryan language varieties. The most archaic of these is the Vedic Sanskrit found in the Rigveda, a collection of 1,028 hymns composed between 1500 and 1200 BCE by Indo-Aryan tribes migrating east from the mountains of what is today northern Afghanistan across northern Pakistan and into northwestern India. Vedic Sanskrit interacted with the preexisting ancient languages of the subcontinent, absorbing names of newly encountered plants and animals; in addition, the ancient Dravidian languages influenced Sanskrit's phonology and syntax. Sanskrit can also more narrowly refer to Classical Sanskrit, a refined and standardized grammatical form that emerged in the mid-1st millennium BCE and was codified in the most comprehensive of ancient grammars, the Aṣṭādhyāyī ('Eight chapters') of Pāṇini. The two major Sanskrit epics, the Mahābhārata and the Rāmāyaṇa, however, were composed in a range of oral storytelling registers called Epic Sanskrit which was used in northern India between 400 BCE and 300 CE, and roughly contemporary with classical Sanskrit. In the following centuries, Sanskrit became tradition-bound, stopped being learned as a first language, and ultimately stopped developing as a living language.

The hymns of the Rigveda are notably similar to the most archaic poems of the Iranian and Greek language families, the Gathas of old Avestan and Iliad of Homer, Sanskrit does not have an attested native script: from around the turn of the 1st-millennium CE, it has been written in various Brahmic scripts, and in the modern era most commonly in Devanagari. However, despite attempts at revival, there are no first-language speakers of Sanskrit in India. In each of India's recent decennial censuses, several thousand citizens have reported Sanskrit to be their mother tongue,