Literature in Sanskrit begins with the Vedas, and continues with the Sanskrit Epics of Iron Age India; the golden age of Classical Sanskrit literature dates to late Antiquity (roughly the 3rd to 8th centuries AD). Literary production saw a late bloom in the 11th century before declining after 1100 AD. There are contemporary efforts towards revival, with events like the "All-India Sanskrit Festival" (since 2002) holding composition contests.
Given its extensive use in religious literature, primarily in Hinduism, and the fact that most modern Indian languages have been directly derived from or strongly influenced by Sanskrit, the language and its literature is of great importance in Indian culture akin that of Greek and Latin in European culture.
Main article: Vedas
Composed between approximately 1500 BC and 600 BC (the Late Bronze Age to Early Iron Age) in pre-classical Sanskrit , Vedic literature forms the basis for the further development of Hinduism. There are four Vedas - Rig, Yajur, Sāma and Atharva, each with a main Samhita and a number of circum-vedic genres, including Brahmanas, Aranyakas,Vedang i.e. Grhyasutras and Shrautasutras and Dharmasutras. The main period of Vedic literary activity falls into ca. the 9th to 7th centuries when the various shakhas (schools) compiled and memorized their respective corpora.
The older Upanishads (BAU, ChU, JUB, KathU, MaitrU) belong to the Vedic period, but the larger part of the Muktika canon is post-Vedic. The Aranyakas form part of both the Brahmana and Upanishad corpus.
Main article: Sutra
See also: Shulba Sutras, Shulba Sutras, Kalpa Sutras, Dharma Sutras, and Shastra
Continuing the tradition of the late Vedic Shrautasutra literature, Late Iron Age scholarship (ca. 500 to 100 BCE) organized knowledge into Sutra treatises, including the Vedanga and the religious or philosophical Brahma Sutras, Yoga Sutras, Nyaya Sutras.
In the Vedanga disciplines of grammar and phonetics, no author had greater influence than Pāṇini with his Aṣṭādhyāyī (ca. 5th century BC). In the tradition of Sutra literature exposing the full grammar of Sanskrit in extreme brevity, Panini's brilliance lies in the nature of his work of a prescriptive generative grammar, involving metarules, transformations and recursion. Being prescriptive for all later grammatical works, such as Patanjali's Mahābhāṣya, Pāṇini's grammar effectively fixed the grammar of Classical Sanskrit. The Backus-Naur Form or BNF grammars used to describe modern programming languages have significant similarities with Panini's grammar rules.
Main article: Indian epic poetry
The period between approximately the 6th to 1st centuries BC saw the composition and redaction of the two great epics, the Mahabharata and the Ramayana, with subsequent redaction progressing down to the 4th century AD. They are known as itihasa, or "that which occurred".
The battle of Kurukshetra, folio from the Mahabharata.
Main article: Mahabharata
The Mahabharata (Great Bharata) is one of the longest poetic works in the world. While it is clearly a poetic epic, it contains large tracts of Hindu mythology, philosophy and religious tracts. Traditionally, authorship of the Mahabharata is attributed to the sage Vyasa.According to the Adi-parva of the Mahabharata (81, 101-102), the text was originally 8,800 verses when it was composed by Vyasa and was known as the Jaya (Victory), which later became 24,000 verses in the Bharata recited by Vaisampayana.
The broad sweep of the story of the Mahabharata chronicles the story of the conflict between two families for control of Hastinapur, a city in Ancient India.
The impact of the Mahabharata on India and Hinduism cannot be stressed enough. Having been molded by Indian culture, it has in turn molded the development of Indian culture. Thousands of later writers would draw freely from the story and sub-stories of the Mahabharata.
Main article: Ramayana
While not as long as the Mahabharata, the Ramayana is still twice as long as the Iliad and Odyssey put together. Traditionally, the authorship is attribued to the Hindu sage who is referred to as Adikavi, or "first poet." Valmiki in the Ramayana introduced the Anushtubh meter for the first time. Like the Mahabharata, the Ramayana was also handed down orally and evolved through several centuries before being transferred into writing. It includes tales that form the basis for modern Hindu festivals and even contains a description of the same marriage practice still observed in contemporary times by people of Hindu persuasion.
The story deals with Prince Rama (Indian vernaculars: Rām or Sri Ram), his exile and the abduction of his wife by the Rakshas king Ravana, and the Lankan war. Similar to the Mahabharata, the Ramayana also has several full-fledged stories appearing as sub-plots.
The Ramayana has also played a similar and equally important role in the development of Indian culture as the Mahabharata.
The Ramayana is also extant in Ramayana: Southeast Asian versions
See also: Hikayat Seri Rama, Kakawin RāmÔyaṇa, Phra Lak Phra Lam, Ramakien, Reamker, and Yama Zatdaw
Classical Sanskrit literature
The classical period of Sanskrit literature dates to the Gupta period and the successive pre-Islamic Middle kingdoms of India, spanning roughly the 3rd to 8th centuries CE.
Main article: Sanskrit drama
Shakuntala stops to look back at Dushyanta, Raja Ravi Varma (1848-1906), scene from Abhij˝ānaśākuntalam.
Drama as a distinct genre of Sanskrit literature emerges in the final centuries BC, influenced partly by Vedic mythology and partly by Hellenistic drama. It reaches its peak between the 4th and 7th centuries before declining together with Sanskrit literature as a whole.
Famous Sanskrit dramatists include Śhudraka, Bhasa, Asvaghosa and Kālidāsa. Though numerous plays written by these playwrights are still available, little is known about the authors themselves.
One of the earliest known Sanskrit plays is the Mrichakatika, thought to have been composed by Śhudraka in the 2nd century BC. The Natya Shastra (ca. 2nd century AD, literally "Scripture of Dance," though it sometimes translated as "Science of Theatre'") is a keystone work in Sanskrit literature on the subject of stagecraft. Bhasa and Kālidāsa are major early authors of the first centuries AD, Kālidāsa qualifying easily as the greatest poet and playwright in Sanskrit He deals primarily with famous Hindu legends and themes; three famous plays by Kālidāsa are Vikramōrvaśīyam (Vikrama and Urvashi), Mālavikāgnimitram (Malavika and Agnimitra), and the play that he is most known for: Abhij˝ānaśākuntalam (The Recognition of Shakuntala).
Late (post 6th century) dramatists include Dandi and Sri Harsha. The only surviving ancient Sanskrit drama theatre is Koodiyattam. Which is being preserved in Kerala by the Chakyar community.
Main articles: Tantras, Shastra, Siddhanta, and Jataka
Further information: Jyotihshastra
The earliest surviving treatise on astrology is the Yavanajataka "sayings of the Greeks" (3rd century). Classical Hindu astrology is based on early medieval compilations, notably the Bṛhat Parāśara Horāśāstra and Sārāvalī (7th to 8th century). The earliest surviving treatise on (non-divinatory) Indian astronomy predates the Yavanajataka: the Vedanga Jyotisha of Ladaga documents the state of in the Maurya period. The astronomy of the classical Gupta period, the centuries following Indo-Greek contact, is documented in treatises known as Siddhantas (which means "established conclusions"  ). Varahamihira in his Pancha-Siddhantika contrasts five of these: The Surya Siddhanta besides the Paitamaha Siddhantas (which is more similar to the "classical" Vedanga Jyotisha), the Paulisha and Romaka Siddhantas (directly based on Hellenistic astronomy) and the Vasishta Siddhanta.
The earliest treatise in Indian mathematics is the Āryabhaṭīya (written ca. 500 CE), a work on astronomy and mathematics. The mathematical portion of the Āryabhaṭīya was composed of 33 sūtras (in verse form) consisting of mathematical statements or rules, but without any proofs. However, according to (Hayashi 2003, p. 123), "this does not necessarily mean that their authors did not prove them. It was probably a matter of style of exposition." From the time of Bhaskara I (600 CE onwards), prose commentaries increasingly began to include some derivations (upapatti).
"Tantra" is a general term for a scientific, magical or mystical treatise and mystical texts both Hindu and Buddhist said to concern themselves with five subjects, 1. the creation, 2. the destruction of the world, 3. the worship of the gods, 4. the attainment of all objects, 5. the four modes of union with the supreme spirit by meditation. These texts date to the entire lifespan of Classical Sanskrit literature.
Fairy tales and fables
Main articles: Panchatantra and Hitopadesha
Sanskrit fairy tales and fables are chiefly characterised by ethical reflections and proverbial philosophy. A peculiar style, marked by the insertion of a number of different stories within the framework of a single narrative, made its way to Persian and Arabic literatures, exerting a major influence on works such as One Thousand and One Nights.
The two most important collections are Panchatantra and Hitopadesha; originally intended as manuals for the instruction of kings in domestic and foreign policy, they belong to the class of literature which the Hindus call nīti-śāstra, or "Science of Political Ethics".
Other notable prose works include a collection of pretty and ingenious fairy tales, with a highly Oriental colouring, the Vetāla-panchaviṃśati or "Twenty-five Tales of the Vetāla" (a demon supposed to occupy corpses), the Siṃhāsana-dvātriṃšikā or "Thirty-two Stories of the Lion-seat" (i.e. throne), which also goes by the name of Vikrama-charita, or "Adventures of Vikrama" and the Śuka-saptati, or "Seventy Stories of a Parrot". These three collections of fairy tales are all written in prose and are comparatively short.
Somadeva's Kathā-sarit-sāgara or "Ocean of Rivers of Stories" is a work of special importance: composed in verse and is of very considerable length. It contains more than 22,000 shlokas, equal to nearly one-fourth of the Mahābhārata.
Fable collections, originally serving as the handbooks of practical moral philosophy, provided an abundant reservoir of ethical maxims that become so popular that works consisting exclusively of poetical aphorisms started to appear. The most important are the two collections by the highly-gifted Bhartṛhari, entitled respectively Nīti-śataka, or "Century of Conduct," and Vairāgya-śataka, or "Century of Renunciation." The keynote prevailing in this new ethical poetry style is the doctrine of the vanity of human life, which was developed before the rise of Buddhism in the sixth century B.C., and has dominated Indian thought ever since.
This refers to the poetry produced from the approximately the 3rd to 8th centuries. Kālidāsa is the foremost example of a classical poet.
But a striking characteristic of Indian literary tradition is that sometimes poets show off their technical dexterity with highly Oulipian word-games, like stanzas that read the same backwards and forwards, words that can be split in different ways to produce different meanings, sophisticated metaphors, and so on. This style is referred to as Kāvya. A classic example is the poet Bharavi and his magnum opus, the Kiratarjuniya (6th-7th century). Magh is noted for his epic poem (mahAkAvya) Shishupala Vadha, the 20 cantos of which are based on the Mahabharata episode where the defiant king Shishupala is beheaded by Krishna's chakra (disc)
The greatest works of poetry in this period are the five Mahākāvyas, or "great composition"s:
- Kumārasambhava by Kālidāsa
- Raghuvamsha by Kālidāsa
- Kiratarjuniya by Bharavi
- Shishupala Vadha by Māgha
- Naishadha-Charita by Sriharsha
Some scholars include the Bhattikavya as a sixth Mahākāvya.
Other major literary works from this period are Kadambari by Banabhatta, the first Sanskrit novelist (6th-7th centuries), the Kama Sutra by Vatsyayana, and the three shatakas of Bhartṛhari.
Main article: Puranas
The corpus of the Hindu Puranas likewise falls into the classical period of Sanskrit literature, dating to between the 5th and 10th centuries, and marks the emergence of the Vaishna and Shaiva denominations of classical Hinduism. The Puranas are classified into a Mahā- ("great") and a Upa- ("lower, additional") corpus. Traditionally they are said to narrate five subjects, called pa˝calakṣaṇa ("five distinguishing marks"):
Sargaśca pratisargasca vamśo manvantarāņi ca I
Vamśānucaritam caiva Purāņam pa˝calakśaņam II
- Sarga — The creation of the universe.
- Pratisarga — Secondary creations, mostly re-creations after dissolution.
- Vamśa — Genealogy of royals and sages.
- Manva˝tara — Various eras.
- Vamśānucaritam — Dynastic histories.
A Purana usually gives prominence to a certain deity (Shiva, Vishnu or Krishna, Durga) and depicts the other gods as subservient.
Later Sanskrit literature
The Avadhuta Gita, an extreme nondual (Sanskrit: advaita) text, is held by Western scholarship to date in its present form from the 9th or 10th centuries. Some important works from the 11th century include the Katha-sarit-sagara and the Gita Govinda of Jayadeva. Nagananda, attributed to King Harsha, is an outstanding drama that outlines the story of King Jimutavahana, who sacrifices himself to save the tribe of serpents. It is also unique in that it invokes Lord Buddha in what is a predominantly Hindu drama.
The Katha-sarita-sagara (An Ocean of Stories) by Somadeva was an 11th century poetic adaptation in Sanskrit of Brihat-katha, written in the 5th century BC in the Paishachi dialect. One of the famous series of stories in this work is the Vikrama and Vetāla series, known to every child in India. On the other side of the spectrum, of the 'Bhana' style of drama, Ubhayabhisarika is a one-person drama of an endearing lecher who knows every courtesan and her family by name.
The Gita Govinda (The song of Govinda) by the Oriya composer Jayadeva is the story of Krishna's love for Radha, and is written in spectacularly lyrical and musical Sanskrit.
Basohli painting (circa 1730 AD) depicting a scene from Jayadeva's Gita Govinda
A central text for several Hindu sects in eastern India, the Gita Govinda is recited regularly at major Hindu pilgrimage sites such as Jagannath temple at Puri, Orissa. The Ashtapadis of the Gita Govinda also form a staple theme in Bharatanatyam and Odissi classical dance recitals.
Beyond the 11th century, the use of Sanskrit for general literature declined, most importantly because of the emergence of literature in vernacular Indian languages (notably Hindi, Marathi, Telugu, and Kannada). Sanskrit continued to be used, largely for Hindu religious and philosophical literature. Sanskrit literature fueled literature in vernacular languages, and the Sanskrit language itself continued to have a profound influence over the development of Indian literature in general.
Attempts at revival of Sanskrit have been undertaken in the Republic of India since its foundation in 1947.