Background Global efforts were critical in controlling the COVID-19 pandemic, and the World Health Organization declared it no longer a public health emergency of international concern in May 2023. Pakistan faced six waves and used every available resource to combat the pandemic. Public knowledge, attitudes, and practices (KAP) are key to the success of preventative interventions. Objective The goal of this study was to examine KAP through an online study of the general population and to evaluate the prevalence and determinants of COVID-19 vaccine hesitancy in Pakistan. Methods Between October and December 2021, a survey of the public was undertaken in several areas across Pakistan. A questionnaire was designed with questions focused on participant`s KAP, and statistical analyses were conducted to observe the normality of the data, knowledge, attitude and practice scores and the correlation between knowledge and attitude. Results Out of 688 participants surveyed, 98% expressing a preference for the vaccine over contracting the disease-causing SARS-CoV-2 virus. Overall, the study respondents had a positive attitude (95%) towards preventive measures to protect against pandemic-related issues and had more interest in the vaccine if it were provided free of cost and if the vaccine could be provided at their homes (74%). For participants in this study, knowledge and attitude remained dependent and positively correlated (p < 0.05). Conclusion This study identified limitations in public health communication techniques used to promote the COVID-19 vaccine that prevented widespread uptake of prevention measures. Additionally, this study revealed that age, education, and gender were statistically significant determinants for vaccine hesitancy (practices) and should likely be considered while making policies for health promotion programs.