Nalanda was an acclaimed Mahavihara, a large Buddhist monastery in the ancient kingdom of Magadha (modern-day Bihar) in India. The site is located about 95 kilometres southeast of Patna near the town of Bihar Sharif, and was a centre of learning from the seventh century BC?1200 . It is a UNESCO World Heritage Site
It is evident from the large numbers of texts that Yijing carried back with him after his 10-year residence at Nalanda, that the Mahavihara must have featured a well-equipped library. Traditional Tibetan sources mention the existence of a great library at Nalanda named Dharmaganja (Piety Mart) which comprised three large multi-storeyed buildings, the Ratnasagara (Ocean of Jewels), the Ratnodadhi (Sea of Jewels), and the Ratnaranjaka (Jewel-adorned). Ratnodadhi was nine storeys high and housed the most sacred manuscripts including the Prajnyaparamita Sutra and the Guhyasamaja.
The exact number of volumes in the Nalanda library is not known. But it is estimated to have been in the hundreds of thousands. The library not only collected religious manuscripts but also had texts on such subjects as grammar, logic, literature, astrology, astronomy, and medicine.The Nalanda library must have had a classification scheme which was possibly based on a text classification scheme developed by the Sanskrit linguist, Panini. Buddhist texts were most likely divided into three classes based on the Tripitaka's three main divisions: the Vinaya, Sutra, and the Abhidhamma.