The library was founded by Miklós Oláh, archbishop of Esztergom, in 1561. It became a university library in 1635 when Péter Pázmány founded the university of Nagyszombat. The Royal Hungarian University and the library moved to Buda together in 1777, then to Pest in 1784. The present building of the library was built in 1876 according to the plans of Antal Skalnitzky. The most beautiful room is the Main Reading Room. It is more than 200 square meters and receives natural light through the glass ceiling; in addition, its walls are decorated with frescoes painted by Károly Lotz.