The COVID-19 pandemic has had a significant impact on both public health, and the global educational system. In response to the concerns surrounding the spread of the disease, many educational institutions, including those in Bangladesh, have shifted to online learning. This study aimed to investigate the perceptions and preferences of university students in Bangladesh towards online classes during the COVID-19 pandemic. The research was based on Binary Logistic Regression (BLR) and was conducted on a sample of 1116 university students in Bangladesh. The results of the study showed that while students faced a range of challenges while participating in online classes, including technical issues and limited access to study materials, they still preferred to participate in online courses due to the ongoing pandemic and the support of their teachers. Furthermore, the study revealed that there were differences in students’ attitudes toward online learning based on gender, geographic location, and type of university. The findings of this study are of great significance to governments, policymakers, technology developers, and university administrators, as they provide valuable information for the development of effective policies for online education in the future. These findings should be taken into consideration as a crucial guide to making in-formed decisions in the area of online education.