Overview
Shloka or śloka (Sanskrit: श्लोक, from the root śru, meaning 'hear') is, in a broad sense, any verse, stanza, proverb or saying. In a more specific sense, it refers to a 32-syllable verse form derived from the Vedic anuṣṭubh metre, widely used in the Bhagavad Gita and many other works of classical Sanskrit literature. In its usual form, the shloka consists of four pādas or quarter-verses of eight syllables each, which may also be analysed as two half-verses of sixteen syllables. While the metre resembles the Vedic anuṣṭubh, it follows stricter prosodic rules.
The shloka is regarded as the foundation of Indian epic poetry and is the most frequently occurring metre in classical Sanskrit verse. It is the standard verse form of the Mahabharata, the Ramayana, the Puranas, the Smritis, and scientific treatises associated with Hindu tradition such as the Sushruta Samhita and Charaka Samhita. The Mahabharata, for example, employs a variety of metres, but the great majority of its stanzas are anuṣṭubh shlokas, with most of the remainder being triṣṭubh. In contrast, the anuṣṭubh has only a minor presence in Vedic literature, where the triṣṭubh and gāyatrī metres dominate, especially in the Rigveda. The prominence of shlokas in a text is therefore considered an indicator that the text is likely post-Vedic.
According to traditional accounts, this verse form arose involuntarily from the sage Vālmīki, the author of the Ramayana. On witnessing a hunter shoot down one of a pair of birds in love, he expressed his sorrow (śoka) for the surviving bird in metrical speech. This grief reminded him of Sita's separation from Shri Rama, and he began composing the Ramayana in shlokas. For this reason, Vālmīki is honoured as the Ādikavi